nucleus_api 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile +7 -0
- data/README.md +787 -0
- data/Rakefile +8 -0
- data/docs/Account.md +22 -0
- data/docs/AccountAllocationMapping.md +17 -0
- data/docs/AccountApi.md +1919 -0
- data/docs/AccountMap.md +9 -0
- data/docs/AccountPermissionVO.md +9 -0
- data/docs/AccountPortfolioRebalanceRequest.md +21 -0
- data/docs/AccountStatus.md +16 -0
- data/docs/AccountType.md +23 -0
- data/docs/AclClientPermissionVO.md +10 -0
- data/docs/AdminClient.md +18 -0
- data/docs/AdminClientApi.md +309 -0
- data/docs/AggregationAccount.md +30 -0
- data/docs/AggregationAccountApi.md +1702 -0
- data/docs/AggregationAccountBalance.md +18 -0
- data/docs/AggregationAccountHolding.md +26 -0
- data/docs/AggregationAccountTransaction.md +23 -0
- data/docs/AggregationAccountsMap.md +9 -0
- data/docs/Allocation.md +22 -0
- data/docs/AllocationAggregatedVO.md +13 -0
- data/docs/AllocationApi.md +872 -0
- data/docs/AllocationComposition.md +18 -0
- data/docs/AllocationCompositionAggregatedVO.md +19 -0
- data/docs/AllocationCompositionModelHoldingsVO.md +22 -0
- data/docs/AllocationNodeMap.md +8 -0
- data/docs/Answer.md +18 -0
- data/docs/AnswerMap.md +8 -0
- data/docs/Application.md +15 -0
- data/docs/ApplicationApi.md +309 -0
- data/docs/AuditLog.md +23 -0
- data/docs/AuditLogApi.md +191 -0
- data/docs/AvailableDateDoubleVO.md +14 -0
- data/docs/BankCredit.md +15 -0
- data/docs/BankLink.md +29 -0
- data/docs/BankLinkMap.md +9 -0
- data/docs/Benchmark.md +17 -0
- data/docs/BenchmarkApi.md +375 -0
- data/docs/BenchmarkComposition.md +9 -0
- data/docs/Brokers.md +9 -0
- data/docs/Budget.md +25 -0
- data/docs/BudgetAggregationAccount.md +8 -0
- data/docs/BudgetApi.md +315 -0
- data/docs/BudgetObject.md +10 -0
- data/docs/BulkApi.md +249 -0
- data/docs/BulkTransaction.md +13 -0
- data/docs/BulkTransactionVO.md +12 -0
- data/docs/Business.md +32 -0
- data/docs/BusinessAddress.md +15 -0
- data/docs/BusinessApi.md +523 -0
- data/docs/Card.md +35 -0
- data/docs/CardAddress.md +14 -0
- data/docs/CardApi.md +754 -0
- data/docs/CardProgram.md +23 -0
- data/docs/Cash.md +10 -0
- data/docs/CategoriesMap.md +9 -0
- data/docs/CategoryInternalResponseVO.md +10 -0
- data/docs/CategoryResponseVO.md +9 -0
- data/docs/Check.md +10 -0
- data/docs/CheckImages.md +9 -0
- data/docs/Client.md +39 -0
- data/docs/ClientAccountMapping.md +10 -0
- data/docs/ClientAddress.md +15 -0
- data/docs/ClientApi.md +1008 -0
- data/docs/ClientRelationship.md +10 -0
- data/docs/ClientResponse.md +17 -0
- data/docs/ClientStatus.md +16 -0
- data/docs/ClientViewGoalData.md +21 -0
- data/docs/Country.md +12 -0
- data/docs/Currency.md +11 -0
- data/docs/Customer.md +21 -0
- data/docs/CustomerAddress.md +14 -0
- data/docs/CustomerApi.md +616 -0
- data/docs/CustomerRevenue.md +16 -0
- data/docs/DailyDeposit.md +28 -0
- data/docs/DailyWithdrawal.md +29 -0
- data/docs/DateDoubleVO.md +10 -0
- data/docs/DecisionTree.md +17 -0
- data/docs/DecisionTreeApi.md +971 -0
- data/docs/DecisionTreeCO.md +9 -0
- data/docs/DecisionTreeResultVO.md +9 -0
- data/docs/Document.md +30 -0
- data/docs/DocumentApi.md +309 -0
- data/docs/Employment.md +11 -0
- data/docs/ExternalAccountTransfer.md +28 -0
- data/docs/Feature.md +18 -0
- data/docs/FeatureApi.md +610 -0
- data/docs/FeatureTrack.md +14 -0
- data/docs/FinancialStatement.md +23 -0
- data/docs/FinancialStatementApi.md +315 -0
- data/docs/Funding.md +37 -0
- data/docs/FundingApi.md +1601 -0
- data/docs/FundingRequestMap.md +8 -0
- data/docs/FxRateView.md +11 -0
- data/docs/Goal.md +24 -0
- data/docs/GoalAccountMapping.md +11 -0
- data/docs/GoalApi.md +841 -0
- data/docs/GoalTrack.md +26 -0
- data/docs/GoalTrackAccounts.md +8 -0
- data/docs/Household.md +18 -0
- data/docs/HouseholdApi.md +523 -0
- data/docs/Investment.md +16 -0
- data/docs/Invoice.md +32 -0
- data/docs/InvoiceApi.md +622 -0
- data/docs/InvoicePayment.md +15 -0
- data/docs/JsonNode.md +29 -0
- data/docs/LineItems.md +15 -0
- data/docs/Location.md +15 -0
- data/docs/MXMerchantRes.md +14 -0
- data/docs/Member.md +11 -0
- data/docs/MerchantCategoryCode.md +11 -0
- data/docs/MerchantsMap.md +9 -0
- data/docs/Model.md +29 -0
- data/docs/ModelApi.md +1580 -0
- data/docs/ModelAssetSize.md +16 -0
- data/docs/ModelComment.md +15 -0
- data/docs/ModelHolding.md +25 -0
- data/docs/ModelHoldingVO.md +11 -0
- data/docs/ModelTransaction.md +17 -0
- data/docs/Node.md +15 -0
- data/docs/NodeRelationship.md +18 -0
- data/docs/Notification.md +20 -0
- data/docs/NotificationApi.md +911 -0
- data/docs/NotificationClient.md +19 -0
- data/docs/NotificationSetting.md +19 -0
- data/docs/Order.md +27 -0
- data/docs/OrderApi.md +1764 -0
- data/docs/OrderBulk.md +18 -0
- data/docs/OrderReconcileRequest.md +12 -0
- data/docs/OrderReconcileReturnObject.md +12 -0
- data/docs/OrderStatus.md +14 -0
- data/docs/OrderTrack.md +20 -0
- data/docs/OrderVoClone.md +20 -0
- data/docs/Overflow.md +16 -0
- data/docs/OverflowApi.md +492 -0
- data/docs/OverflowBankLinkMap.md +9 -0
- data/docs/OverflowSettings.md +17 -0
- data/docs/OverflowVO.md +10 -0
- data/docs/Ownership.md +12 -0
- data/docs/PageAccount.md +16 -0
- data/docs/PageAccountAllocationMapping.md +16 -0
- data/docs/PageAccountPermissionVO.md +16 -0
- data/docs/PageAccountStatus.md +16 -0
- data/docs/PageAccountType.md +16 -0
- data/docs/PageAdminClient.md +16 -0
- data/docs/PageAggregationAccount.md +16 -0
- data/docs/PageAggregationAccountBalance.md +16 -0
- data/docs/PageAggregationAccountHolding.md +16 -0
- data/docs/PageAggregationAccountTransaction.md +16 -0
- data/docs/PageAllocation.md +16 -0
- data/docs/PageAllocationComposition.md +16 -0
- data/docs/PageAnswer.md +16 -0
- data/docs/PageApplication.md +16 -0
- data/docs/PageAuditLog.md +16 -0
- data/docs/PageBankLink.md +16 -0
- data/docs/PageBenchmark.md +16 -0
- data/docs/PageBudget.md +16 -0
- data/docs/PageBusiness.md +16 -0
- data/docs/PageCard.md +16 -0
- data/docs/PageCardProgram.md +16 -0
- data/docs/PageClient.md +16 -0
- data/docs/PageClientResponse.md +16 -0
- data/docs/PageClientStatus.md +16 -0
- data/docs/PageCustomer.md +16 -0
- data/docs/PageCustomerRevenue.md +16 -0
- data/docs/PageDailyDeposit.md +16 -0
- data/docs/PageDailyWithdrawal.md +16 -0
- data/docs/PageDecisionTree.md +16 -0
- data/docs/PageDocument.md +16 -0
- data/docs/PageExternalAccountTransfer.md +16 -0
- data/docs/PageFeature.md +16 -0
- data/docs/PageFeatureTrack.md +16 -0
- data/docs/PageFinancialStatement.md +16 -0
- data/docs/PageFunding.md +16 -0
- data/docs/PageGoal.md +16 -0
- data/docs/PageGoalTrack.md +16 -0
- data/docs/PageHousehold.md +16 -0
- data/docs/PageInvoice.md +16 -0
- data/docs/PageInvoicePayment.md +16 -0
- data/docs/PageMXMerchantRes.md +16 -0
- data/docs/PageModel.md +16 -0
- data/docs/PageModelAssetSize.md +16 -0
- data/docs/PageModelComment.md +16 -0
- data/docs/PageModelHolding.md +16 -0
- data/docs/PageModelTransaction.md +16 -0
- data/docs/PageNode.md +16 -0
- data/docs/PageNodeRelationship.md +16 -0
- data/docs/PageNotification.md +16 -0
- data/docs/PageNotificationClient.md +16 -0
- data/docs/PageNotificationSetting.md +16 -0
- data/docs/PageOrder.md +16 -0
- data/docs/PageOrderBulk.md +16 -0
- data/docs/PageOrderStatus.md +16 -0
- data/docs/PageOrderTrack.md +16 -0
- data/docs/PageOverflow.md +16 -0
- data/docs/PageOverflowSettings.md +16 -0
- data/docs/PagePortfolio.md +16 -0
- data/docs/PagePortfolioAssetSizeLog.md +16 -0
- data/docs/PagePortfolioComment.md +16 -0
- data/docs/PagePortfolioGoal.md +16 -0
- data/docs/PagePortfolioHoldingLog.md +16 -0
- data/docs/PagePortfolioTransaction.md +16 -0
- data/docs/PageQuestion.md +16 -0
- data/docs/PageQuestionnaire.md +16 -0
- data/docs/PageReasonCode.md +16 -0
- data/docs/PageRiskProfile.md +16 -0
- data/docs/PageRoundup.md +16 -0
- data/docs/PageRoundupSettings.md +16 -0
- data/docs/PageScore.md +16 -0
- data/docs/PageSecurity.md +16 -0
- data/docs/PageSecurityExclusion.md +16 -0
- data/docs/PageSecurityPrice.md +16 -0
- data/docs/PageSpendingControl.md +16 -0
- data/docs/PageStage.md +16 -0
- data/docs/PageTransactionCode.md +16 -0
- data/docs/PageVAccountAssetSize.md +16 -0
- data/docs/PageWebhook.md +16 -0
- data/docs/PerformanceApi.md +973 -0
- data/docs/PermissionVO.md +9 -0
- data/docs/Portfolio.md +22 -0
- data/docs/PortfolioApi.md +1902 -0
- data/docs/PortfolioAssetSizeLog.md +20 -0
- data/docs/PortfolioComment.md +16 -0
- data/docs/PortfolioGoal.md +14 -0
- data/docs/PortfolioGoalMap.md +9 -0
- data/docs/PortfolioHoldingAgg.md +14 -0
- data/docs/PortfolioHoldingLog.md +21 -0
- data/docs/PortfolioTransaction.md +37 -0
- data/docs/Question.md +23 -0
- data/docs/Questionnaire.md +17 -0
- data/docs/QuestionnaireApi.md +1212 -0
- data/docs/ReasonCode.md +17 -0
- data/docs/ResourceApi.md +534 -0
- data/docs/RiskProfile.md +18 -0
- data/docs/RiskProfileApi.md +309 -0
- data/docs/Roundup.md +15 -0
- data/docs/RoundupApi.md +492 -0
- data/docs/RoundupCO.md +12 -0
- data/docs/RoundupSettings.md +21 -0
- data/docs/Score.md +23 -0
- data/docs/ScoreApi.md +309 -0
- data/docs/SecuritiesApi.md +917 -0
- data/docs/SecuritiesComposition.md +11 -0
- data/docs/SecuritiesCountry.md +9 -0
- data/docs/Security.md +32 -0
- data/docs/SecurityCompositionVO.md +21 -0
- data/docs/SecurityCountryVO.md +9 -0
- data/docs/SecurityExclusion.md +18 -0
- data/docs/SecurityPrice.md +20 -0
- data/docs/Sort.md +13 -0
- data/docs/SpendingControl.md +21 -0
- data/docs/SpendingControlApi.md +309 -0
- data/docs/Stage.md +22 -0
- data/docs/Stat.md +9 -0
- data/docs/State.md +10 -0
- data/docs/StatisticResourceVO.md +11 -0
- data/docs/TokenDateRequest.md +13 -0
- data/docs/TransactionCode.md +20 -0
- data/docs/UtilsApi.md +911 -0
- data/docs/VAccountAssetSize.md +11 -0
- data/docs/VAccountVO.md +13 -0
- data/docs/VClientGoalViewData.md +13 -0
- data/docs/VPortfolioVO.md +11 -0
- data/docs/Webhook.md +15 -0
- data/docs/WebhookApi.md +309 -0
- data/git_push.sh +55 -0
- data/lib/nucleus_api.rb +303 -0
- data/lib/nucleus_api/api/account_api.rb +1794 -0
- data/lib/nucleus_api/api/admin_client_api.rb +301 -0
- data/lib/nucleus_api/api/aggregation_account_api.rb +1587 -0
- data/lib/nucleus_api/api/allocation_api.rb +824 -0
- data/lib/nucleus_api/api/application_api.rb +301 -0
- data/lib/nucleus_api/api/audit_log_api.rb +190 -0
- data/lib/nucleus_api/api/benchmark_api.rb +362 -0
- data/lib/nucleus_api/api/budget_api.rb +307 -0
- data/lib/nucleus_api/api/bulk_api.rb +253 -0
- data/lib/nucleus_api/api/business_api.rb +508 -0
- data/lib/nucleus_api/api/card_api.rb +719 -0
- data/lib/nucleus_api/api/client_api.rb +950 -0
- data/lib/nucleus_api/api/customer_api.rb +585 -0
- data/lib/nucleus_api/api/decision_tree_api.rb +913 -0
- data/lib/nucleus_api/api/document_api.rb +301 -0
- data/lib/nucleus_api/api/feature_api.rb +579 -0
- data/lib/nucleus_api/api/financial_statement_api.rb +307 -0
- data/lib/nucleus_api/api/funding_api.rb +1497 -0
- data/lib/nucleus_api/api/goal_api.rb +819 -0
- data/lib/nucleus_api/api/household_api.rb +508 -0
- data/lib/nucleus_api/api/invoice_api.rb +591 -0
- data/lib/nucleus_api/api/model_api.rb +1479 -0
- data/lib/nucleus_api/api/notification_api.rb +857 -0
- data/lib/nucleus_api/api/order_api.rb +1688 -0
- data/lib/nucleus_api/api/overflow_api.rb +468 -0
- data/lib/nucleus_api/api/performance_api.rb +1131 -0
- data/lib/nucleus_api/api/portfolio_api.rb +1776 -0
- data/lib/nucleus_api/api/questionnaire_api.rb +1135 -0
- data/lib/nucleus_api/api/resource_api.rb +479 -0
- data/lib/nucleus_api/api/risk_profile_api.rb +301 -0
- data/lib/nucleus_api/api/roundup_api.rb +468 -0
- data/lib/nucleus_api/api/score_api.rb +301 -0
- data/lib/nucleus_api/api/securities_api.rb +863 -0
- data/lib/nucleus_api/api/spending_control_api.rb +301 -0
- data/lib/nucleus_api/api/utils_api.rb +857 -0
- data/lib/nucleus_api/api/webhook_api.rb +301 -0
- data/lib/nucleus_api/api_client.rb +428 -0
- data/lib/nucleus_api/api_error.rb +38 -0
- data/lib/nucleus_api/auth_configuration.rb +177 -0
- data/lib/nucleus_api/configuration.rb +224 -0
- data/lib/nucleus_api/models/account.rb +333 -0
- data/lib/nucleus_api/models/account_allocation_mapping.rb +294 -0
- data/lib/nucleus_api/models/account_map.rb +202 -0
- data/lib/nucleus_api/models/account_permission_vo.rb +195 -0
- data/lib/nucleus_api/models/account_portfolio_rebalance_request.rb +313 -0
- data/lib/nucleus_api/models/account_status.rb +275 -0
- data/lib/nucleus_api/models/account_type.rb +335 -0
- data/lib/nucleus_api/models/acl_client_permission_vo.rb +236 -0
- data/lib/nucleus_api/models/admin_client.rb +272 -0
- data/lib/nucleus_api/models/aggregation_account.rb +420 -0
- data/lib/nucleus_api/models/aggregation_account_balance.rb +284 -0
- data/lib/nucleus_api/models/aggregation_account_holding.rb +364 -0
- data/lib/nucleus_api/models/aggregation_account_transaction.rb +382 -0
- data/lib/nucleus_api/models/aggregation_accounts_map.rb +202 -0
- data/lib/nucleus_api/models/allocation.rb +325 -0
- data/lib/nucleus_api/models/allocation_aggregated_vo.rb +228 -0
- data/lib/nucleus_api/models/allocation_composition.rb +304 -0
- data/lib/nucleus_api/models/allocation_composition_aggregated_vo.rb +282 -0
- data/lib/nucleus_api/models/allocation_composition_model_holdings_vo.rb +311 -0
- data/lib/nucleus_api/models/allocation_node_map.rb +187 -0
- data/lib/nucleus_api/models/answer.rb +286 -0
- data/lib/nucleus_api/models/answer_map.rb +181 -0
- data/lib/nucleus_api/models/application.rb +256 -0
- data/lib/nucleus_api/models/audit_log.rb +357 -0
- data/lib/nucleus_api/models/available_date_double_vo.rb +243 -0
- data/lib/nucleus_api/models/bank_credit.rb +262 -0
- data/lib/nucleus_api/models/bank_link.rb +410 -0
- data/lib/nucleus_api/models/bank_link_map.rb +202 -0
- data/lib/nucleus_api/models/benchmark.rb +277 -0
- data/lib/nucleus_api/models/benchmark_composition.rb +202 -0
- data/lib/nucleus_api/models/brokers.rb +203 -0
- data/lib/nucleus_api/models/budget.rb +372 -0
- data/lib/nucleus_api/models/budget_aggregation_account.rb +187 -0
- data/lib/nucleus_api/models/budget_object.rb +213 -0
- data/lib/nucleus_api/models/bulk_transaction.rb +226 -0
- data/lib/nucleus_api/models/bulk_transaction_vo.rb +217 -0
- data/lib/nucleus_api/models/business.rb +430 -0
- data/lib/nucleus_api/models/business_address.rb +278 -0
- data/lib/nucleus_api/models/card.rb +489 -0
- data/lib/nucleus_api/models/card_address.rb +268 -0
- data/lib/nucleus_api/models/card_program.rb +350 -0
- data/lib/nucleus_api/models/cash.rb +213 -0
- data/lib/nucleus_api/models/categories_map.rb +202 -0
- data/lib/nucleus_api/models/category_internal_response_vo.rb +201 -0
- data/lib/nucleus_api/models/category_response_vo.rb +192 -0
- data/lib/nucleus_api/models/check.rb +210 -0
- data/lib/nucleus_api/models/check_images.rb +198 -0
- data/lib/nucleus_api/models/client.rb +523 -0
- data/lib/nucleus_api/models/client_account_mapping.rb +212 -0
- data/lib/nucleus_api/models/client_address.rb +278 -0
- data/lib/nucleus_api/models/client_relationship.rb +209 -0
- data/lib/nucleus_api/models/client_response.rb +280 -0
- data/lib/nucleus_api/models/client_status.rb +275 -0
- data/lib/nucleus_api/models/client_view_goal_data.rb +302 -0
- data/lib/nucleus_api/models/country.rb +233 -0
- data/lib/nucleus_api/models/currency.rb +212 -0
- data/lib/nucleus_api/models/customer.rb +317 -0
- data/lib/nucleus_api/models/customer_address.rb +268 -0
- data/lib/nucleus_api/models/customer_revenue.rb +284 -0
- data/lib/nucleus_api/models/daily_deposit.rb +395 -0
- data/lib/nucleus_api/models/daily_withdrawal.rb +405 -0
- data/lib/nucleus_api/models/date_double_vo.rb +203 -0
- data/lib/nucleus_api/models/decision_tree.rb +275 -0
- data/lib/nucleus_api/models/decision_tree_co.rb +202 -0
- data/lib/nucleus_api/models/decision_tree_result_vo.rb +192 -0
- data/lib/nucleus_api/models/document.rb +409 -0
- data/lib/nucleus_api/models/employment.rb +213 -0
- data/lib/nucleus_api/models/external_account_transfer.rb +412 -0
- data/lib/nucleus_api/models/feature.rb +286 -0
- data/lib/nucleus_api/models/feature_track.rb +251 -0
- data/lib/nucleus_api/models/financial_statement.rb +352 -0
- data/lib/nucleus_api/models/funding.rb +496 -0
- data/lib/nucleus_api/models/funding_request_map.rb +187 -0
- data/lib/nucleus_api/models/fx_rate_view.rb +233 -0
- data/lib/nucleus_api/models/goal.rb +340 -0
- data/lib/nucleus_api/models/goal_account_mapping.rb +218 -0
- data/lib/nucleus_api/models/goal_track.rb +372 -0
- data/lib/nucleus_api/models/goal_track_accounts.rb +187 -0
- data/lib/nucleus_api/models/household.rb +285 -0
- data/lib/nucleus_api/models/investment.rb +283 -0
- data/lib/nucleus_api/models/invoice.rb +452 -0
- data/lib/nucleus_api/models/invoice_payment.rb +269 -0
- data/lib/nucleus_api/models/json_node.rb +404 -0
- data/lib/nucleus_api/models/line_items.rb +278 -0
- data/lib/nucleus_api/models/location.rb +253 -0
- data/lib/nucleus_api/models/member.rb +217 -0
- data/lib/nucleus_api/models/merchant_category_code.rb +213 -0
- data/lib/nucleus_api/models/merchants_map.rb +202 -0
- data/lib/nucleus_api/models/model.rb +396 -0
- data/lib/nucleus_api/models/model_asset_size.rb +274 -0
- data/lib/nucleus_api/models/model_comment.rb +264 -0
- data/lib/nucleus_api/models/model_holding.rb +370 -0
- data/lib/nucleus_api/models/model_holding_vo.rb +208 -0
- data/lib/nucleus_api/models/model_transaction.rb +298 -0
- data/lib/nucleus_api/models/mx_merchant_res.rb +235 -0
- data/lib/nucleus_api/models/node.rb +260 -0
- data/lib/nucleus_api/models/node_relationship.rb +300 -0
- data/lib/nucleus_api/models/notification.rb +313 -0
- data/lib/nucleus_api/models/notification_client.rb +309 -0
- data/lib/nucleus_api/models/notification_setting.rb +300 -0
- data/lib/nucleus_api/models/order.rb +390 -0
- data/lib/nucleus_api/models/order_bulk.rb +309 -0
- data/lib/nucleus_api/models/order_reconcile_request.rb +220 -0
- data/lib/nucleus_api/models/order_reconcile_return_object.rb +227 -0
- data/lib/nucleus_api/models/order_status.rb +250 -0
- data/lib/nucleus_api/models/order_track.rb +316 -0
- data/lib/nucleus_api/models/order_vo_clone.rb +304 -0
- data/lib/nucleus_api/models/overflow.rb +281 -0
- data/lib/nucleus_api/models/overflow_bank_link_map.rb +202 -0
- data/lib/nucleus_api/models/overflow_settings.rb +287 -0
- data/lib/nucleus_api/models/overflow_vo.rb +203 -0
- data/lib/nucleus_api/models/ownership.rb +233 -0
- data/lib/nucleus_api/models/page_account.rb +258 -0
- data/lib/nucleus_api/models/page_account_allocation_mapping.rb +258 -0
- data/lib/nucleus_api/models/page_account_permission_vo.rb +258 -0
- data/lib/nucleus_api/models/page_account_status.rb +258 -0
- data/lib/nucleus_api/models/page_account_type.rb +258 -0
- data/lib/nucleus_api/models/page_admin_client.rb +258 -0
- data/lib/nucleus_api/models/page_aggregation_account.rb +258 -0
- data/lib/nucleus_api/models/page_aggregation_account_balance.rb +258 -0
- data/lib/nucleus_api/models/page_aggregation_account_holding.rb +258 -0
- data/lib/nucleus_api/models/page_aggregation_account_transaction.rb +258 -0
- data/lib/nucleus_api/models/page_allocation.rb +258 -0
- data/lib/nucleus_api/models/page_allocation_composition.rb +258 -0
- data/lib/nucleus_api/models/page_answer.rb +258 -0
- data/lib/nucleus_api/models/page_application.rb +258 -0
- data/lib/nucleus_api/models/page_audit_log.rb +258 -0
- data/lib/nucleus_api/models/page_bank_link.rb +258 -0
- data/lib/nucleus_api/models/page_benchmark.rb +258 -0
- data/lib/nucleus_api/models/page_budget.rb +258 -0
- data/lib/nucleus_api/models/page_business.rb +258 -0
- data/lib/nucleus_api/models/page_card.rb +258 -0
- data/lib/nucleus_api/models/page_card_program.rb +258 -0
- data/lib/nucleus_api/models/page_client.rb +258 -0
- data/lib/nucleus_api/models/page_client_response.rb +258 -0
- data/lib/nucleus_api/models/page_client_status.rb +258 -0
- data/lib/nucleus_api/models/page_customer.rb +258 -0
- data/lib/nucleus_api/models/page_customer_revenue.rb +258 -0
- data/lib/nucleus_api/models/page_daily_deposit.rb +258 -0
- data/lib/nucleus_api/models/page_daily_withdrawal.rb +258 -0
- data/lib/nucleus_api/models/page_decision_tree.rb +258 -0
- data/lib/nucleus_api/models/page_document.rb +258 -0
- data/lib/nucleus_api/models/page_external_account_transfer.rb +258 -0
- data/lib/nucleus_api/models/page_feature.rb +258 -0
- data/lib/nucleus_api/models/page_feature_track.rb +258 -0
- data/lib/nucleus_api/models/page_financial_statement.rb +258 -0
- data/lib/nucleus_api/models/page_funding.rb +258 -0
- data/lib/nucleus_api/models/page_goal.rb +258 -0
- data/lib/nucleus_api/models/page_goal_track.rb +258 -0
- data/lib/nucleus_api/models/page_household.rb +258 -0
- data/lib/nucleus_api/models/page_invoice.rb +258 -0
- data/lib/nucleus_api/models/page_invoice_payment.rb +258 -0
- data/lib/nucleus_api/models/page_model.rb +258 -0
- data/lib/nucleus_api/models/page_model_asset_size.rb +258 -0
- data/lib/nucleus_api/models/page_model_comment.rb +258 -0
- data/lib/nucleus_api/models/page_model_holding.rb +258 -0
- data/lib/nucleus_api/models/page_model_transaction.rb +258 -0
- data/lib/nucleus_api/models/page_mx_merchant_res.rb +255 -0
- data/lib/nucleus_api/models/page_node.rb +258 -0
- data/lib/nucleus_api/models/page_node_relationship.rb +258 -0
- data/lib/nucleus_api/models/page_notification.rb +258 -0
- data/lib/nucleus_api/models/page_notification_client.rb +258 -0
- data/lib/nucleus_api/models/page_notification_setting.rb +258 -0
- data/lib/nucleus_api/models/page_order.rb +258 -0
- data/lib/nucleus_api/models/page_order_bulk.rb +258 -0
- data/lib/nucleus_api/models/page_order_status.rb +258 -0
- data/lib/nucleus_api/models/page_order_track.rb +258 -0
- data/lib/nucleus_api/models/page_overflow.rb +258 -0
- data/lib/nucleus_api/models/page_overflow_settings.rb +258 -0
- data/lib/nucleus_api/models/page_portfolio.rb +258 -0
- data/lib/nucleus_api/models/page_portfolio_asset_size_log.rb +258 -0
- data/lib/nucleus_api/models/page_portfolio_comment.rb +258 -0
- data/lib/nucleus_api/models/page_portfolio_goal.rb +258 -0
- data/lib/nucleus_api/models/page_portfolio_holding_log.rb +258 -0
- data/lib/nucleus_api/models/page_portfolio_transaction.rb +258 -0
- data/lib/nucleus_api/models/page_question.rb +258 -0
- data/lib/nucleus_api/models/page_questionnaire.rb +258 -0
- data/lib/nucleus_api/models/page_reason_code.rb +258 -0
- data/lib/nucleus_api/models/page_risk_profile.rb +258 -0
- data/lib/nucleus_api/models/page_roundup.rb +258 -0
- data/lib/nucleus_api/models/page_roundup_settings.rb +258 -0
- data/lib/nucleus_api/models/page_score.rb +258 -0
- data/lib/nucleus_api/models/page_security.rb +258 -0
- data/lib/nucleus_api/models/page_security_exclusion.rb +258 -0
- data/lib/nucleus_api/models/page_security_price.rb +258 -0
- data/lib/nucleus_api/models/page_spending_control.rb +258 -0
- data/lib/nucleus_api/models/page_stage.rb +258 -0
- data/lib/nucleus_api/models/page_transaction_code.rb +258 -0
- data/lib/nucleus_api/models/page_v_account_asset_size.rb +258 -0
- data/lib/nucleus_api/models/page_webhook.rb +258 -0
- data/lib/nucleus_api/models/permission_vo.rb +226 -0
- data/lib/nucleus_api/models/portfolio.rb +341 -0
- data/lib/nucleus_api/models/portfolio_asset_size_log.rb +329 -0
- data/lib/nucleus_api/models/portfolio_comment.rb +279 -0
- data/lib/nucleus_api/models/portfolio_goal.rb +255 -0
- data/lib/nucleus_api/models/portfolio_goal_map.rb +202 -0
- data/lib/nucleus_api/models/portfolio_holding_agg.rb +243 -0
- data/lib/nucleus_api/models/portfolio_holding_log.rb +339 -0
- data/lib/nucleus_api/models/portfolio_transaction.rb +495 -0
- data/lib/nucleus_api/models/question.rb +334 -0
- data/lib/nucleus_api/models/questionnaire.rb +275 -0
- data/lib/nucleus_api/models/reason_code.rb +274 -0
- data/lib/nucleus_api/models/risk_profile.rb +286 -0
- data/lib/nucleus_api/models/roundup.rb +266 -0
- data/lib/nucleus_api/models/roundup_co.rb +232 -0
- data/lib/nucleus_api/models/roundup_settings.rb +331 -0
- data/lib/nucleus_api/models/score.rb +374 -0
- data/lib/nucleus_api/models/securities_composition.rb +232 -0
- data/lib/nucleus_api/models/securities_country.rb +202 -0
- data/lib/nucleus_api/models/security.rb +434 -0
- data/lib/nucleus_api/models/security_composition_vo.rb +300 -0
- data/lib/nucleus_api/models/security_country_vo.rb +190 -0
- data/lib/nucleus_api/models/security_exclusion.rb +300 -0
- data/lib/nucleus_api/models/security_price.rb +313 -0
- data/lib/nucleus_api/models/sort.rb +233 -0
- data/lib/nucleus_api/models/spending_control.rb +331 -0
- data/lib/nucleus_api/models/stage.rb +325 -0
- data/lib/nucleus_api/models/stat.rb +203 -0
- data/lib/nucleus_api/models/state.rb +202 -0
- data/lib/nucleus_api/models/statistic_resource_vo.rb +208 -0
- data/lib/nucleus_api/models/token_date_request.rb +233 -0
- data/lib/nucleus_api/models/transaction_code.rb +362 -0
- data/lib/nucleus_api/models/v_account_asset_size.rb +212 -0
- data/lib/nucleus_api/models/v_account_vo.rb +226 -0
- data/lib/nucleus_api/models/v_client_goal_view_data.rb +228 -0
- data/lib/nucleus_api/models/v_portfolio_vo.rb +208 -0
- data/lib/nucleus_api/models/webhook.rb +280 -0
- data/lib/nucleus_api/version.rb +15 -0
- data/nucleus_api.gemspec +46 -0
- data/spec/api/account_api_spec.rb +455 -0
- data/spec/api/admin_client_api_spec.rb +100 -0
- data/spec/api/aggregation_account_api_spec.rb +399 -0
- data/spec/api/allocation_api_spec.rb +225 -0
- data/spec/api/application_api_spec.rb +100 -0
- data/spec/api/audit_log_api_spec.rb +75 -0
- data/spec/api/benchmark_api_spec.rb +115 -0
- data/spec/api/budget_api_spec.rb +102 -0
- data/spec/api/bulk_api_spec.rb +86 -0
- data/spec/api/business_api_spec.rb +153 -0
- data/spec/api/card_api_spec.rb +201 -0
- data/spec/api/client_api_spec.rb +256 -0
- data/spec/api/customer_api_spec.rb +167 -0
- data/spec/api/decision_tree_api_spec.rb +242 -0
- data/spec/api/document_api_spec.rb +100 -0
- data/spec/api/feature_api_spec.rb +165 -0
- data/spec/api/financial_statement_api_spec.rb +102 -0
- data/spec/api/funding_api_spec.rb +382 -0
- data/spec/api/goal_api_spec.rb +225 -0
- data/spec/api/household_api_spec.rb +153 -0
- data/spec/api/invoice_api_spec.rb +169 -0
- data/spec/api/model_api_spec.rb +375 -0
- data/spec/api/notification_api_spec.rb +230 -0
- data/spec/api/order_api_spec.rb +412 -0
- data/spec/api/overflow_api_spec.rb +140 -0
- data/spec/api/performance_api_spec.rb +355 -0
- data/spec/api/portfolio_api_spec.rb +448 -0
- data/spec/api/questionnaire_api_spec.rb +295 -0
- data/spec/api/resource_api_spec.rb +148 -0
- data/spec/api/risk_profile_api_spec.rb +100 -0
- data/spec/api/roundup_api_spec.rb +140 -0
- data/spec/api/score_api_spec.rb +100 -0
- data/spec/api/securities_api_spec.rb +232 -0
- data/spec/api/spending_control_api_spec.rb +100 -0
- data/spec/api/utils_api_spec.rb +230 -0
- data/spec/api/webhook_api_spec.rb +100 -0
- data/spec/api_client_spec.rb +243 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/account_allocation_mapping_spec.rb +95 -0
- data/spec/models/account_map_spec.rb +47 -0
- data/spec/models/account_permission_vo_spec.rb +47 -0
- data/spec/models/account_portfolio_rebalance_request_spec.rb +119 -0
- data/spec/models/account_spec.rb +125 -0
- data/spec/models/account_status_spec.rb +89 -0
- data/spec/models/account_type_spec.rb +131 -0
- data/spec/models/acl_client_permission_vo_spec.rb +57 -0
- data/spec/models/admin_client_spec.rb +101 -0
- data/spec/models/aggregation_account_balance_spec.rb +101 -0
- data/spec/models/aggregation_account_holding_spec.rb +149 -0
- data/spec/models/aggregation_account_spec.rb +173 -0
- data/spec/models/aggregation_account_transaction_spec.rb +139 -0
- data/spec/models/aggregation_accounts_map_spec.rb +47 -0
- data/spec/models/allocation_aggregated_vo_spec.rb +71 -0
- data/spec/models/allocation_composition_aggregated_vo_spec.rb +107 -0
- data/spec/models/allocation_composition_model_holdings_vo_spec.rb +125 -0
- data/spec/models/allocation_composition_spec.rb +101 -0
- data/spec/models/allocation_node_map_spec.rb +41 -0
- data/spec/models/allocation_spec.rb +125 -0
- data/spec/models/answer_map_spec.rb +41 -0
- data/spec/models/answer_spec.rb +101 -0
- data/spec/models/application_spec.rb +83 -0
- data/spec/models/audit_log_spec.rb +131 -0
- data/spec/models/available_date_double_vo_spec.rb +77 -0
- data/spec/models/bank_credit_spec.rb +83 -0
- data/spec/models/bank_link_map_spec.rb +47 -0
- data/spec/models/bank_link_spec.rb +167 -0
- data/spec/models/benchmark_composition_spec.rb +47 -0
- data/spec/models/benchmark_spec.rb +95 -0
- data/spec/models/brokers_spec.rb +47 -0
- data/spec/models/budget_aggregation_account_spec.rb +41 -0
- data/spec/models/budget_object_spec.rb +53 -0
- data/spec/models/budget_spec.rb +143 -0
- data/spec/models/bulk_transaction_spec.rb +71 -0
- data/spec/models/bulk_transaction_vo_spec.rb +65 -0
- data/spec/models/business_address_spec.rb +83 -0
- data/spec/models/business_spec.rb +185 -0
- data/spec/models/card_address_spec.rb +77 -0
- data/spec/models/card_program_spec.rb +131 -0
- data/spec/models/card_spec.rb +202 -0
- data/spec/models/cash_spec.rb +53 -0
- data/spec/models/categories_map_spec.rb +47 -0
- data/spec/models/category_internal_response_vo_spec.rb +53 -0
- data/spec/models/category_response_vo_spec.rb +47 -0
- data/spec/models/check_images_spec.rb +47 -0
- data/spec/models/check_spec.rb +53 -0
- data/spec/models/client_account_mapping_spec.rb +53 -0
- data/spec/models/client_address_spec.rb +83 -0
- data/spec/models/client_relationship_spec.rb +53 -0
- data/spec/models/client_response_spec.rb +95 -0
- data/spec/models/client_spec.rb +239 -0
- data/spec/models/client_status_spec.rb +89 -0
- data/spec/models/client_view_goal_data_spec.rb +119 -0
- data/spec/models/country_spec.rb +65 -0
- data/spec/models/currency_spec.rb +59 -0
- data/spec/models/customer_address_spec.rb +77 -0
- data/spec/models/customer_revenue_spec.rb +89 -0
- data/spec/models/customer_spec.rb +119 -0
- data/spec/models/daily_deposit_spec.rb +161 -0
- data/spec/models/daily_withdrawal_spec.rb +167 -0
- data/spec/models/date_double_vo_spec.rb +53 -0
- data/spec/models/decision_tree_co_spec.rb +47 -0
- data/spec/models/decision_tree_result_vo_spec.rb +47 -0
- data/spec/models/decision_tree_spec.rb +95 -0
- data/spec/models/document_spec.rb +173 -0
- data/spec/models/employment_spec.rb +59 -0
- data/spec/models/external_account_transfer_spec.rb +161 -0
- data/spec/models/feature_spec.rb +101 -0
- data/spec/models/feature_track_spec.rb +77 -0
- data/spec/models/financial_statement_spec.rb +131 -0
- data/spec/models/funding_request_map_spec.rb +41 -0
- data/spec/models/funding_spec.rb +215 -0
- data/spec/models/fx_rate_view_spec.rb +59 -0
- data/spec/models/goal_account_mapping_spec.rb +59 -0
- data/spec/models/goal_spec.rb +137 -0
- data/spec/models/goal_track_accounts_spec.rb +41 -0
- data/spec/models/goal_track_spec.rb +149 -0
- data/spec/models/household_spec.rb +101 -0
- data/spec/models/investment_spec.rb +89 -0
- data/spec/models/invoice_payment_spec.rb +83 -0
- data/spec/models/invoice_spec.rb +185 -0
- data/spec/models/json_node_spec.rb +171 -0
- data/spec/models/line_items_spec.rb +83 -0
- data/spec/models/location_spec.rb +83 -0
- data/spec/models/member_spec.rb +59 -0
- data/spec/models/merchant_category_code_spec.rb +59 -0
- data/spec/models/merchants_map_spec.rb +47 -0
- data/spec/models/model_asset_size_spec.rb +89 -0
- data/spec/models/model_comment_spec.rb +83 -0
- data/spec/models/model_holding_spec.rb +143 -0
- data/spec/models/model_holding_vo_spec.rb +59 -0
- data/spec/models/model_spec.rb +167 -0
- data/spec/models/model_transaction_spec.rb +95 -0
- data/spec/models/mx_merchant_res_spec.rb +77 -0
- data/spec/models/node_relationship_spec.rb +101 -0
- data/spec/models/node_spec.rb +83 -0
- data/spec/models/notification_client_spec.rb +107 -0
- data/spec/models/notification_setting_spec.rb +107 -0
- data/spec/models/notification_spec.rb +113 -0
- data/spec/models/order_bulk_spec.rb +101 -0
- data/spec/models/order_reconcile_request_spec.rb +65 -0
- data/spec/models/order_reconcile_return_object_spec.rb +65 -0
- data/spec/models/order_spec.rb +155 -0
- data/spec/models/order_status_spec.rb +77 -0
- data/spec/models/order_track_spec.rb +113 -0
- data/spec/models/order_vo_clone_spec.rb +113 -0
- data/spec/models/overflow_bank_link_map_spec.rb +47 -0
- data/spec/models/overflow_settings_spec.rb +95 -0
- data/spec/models/overflow_spec.rb +89 -0
- data/spec/models/overflow_vo_spec.rb +53 -0
- data/spec/models/ownership_spec.rb +65 -0
- data/spec/models/page_account_allocation_mapping_spec.rb +89 -0
- data/spec/models/page_account_permission_vo_spec.rb +89 -0
- data/spec/models/page_account_spec.rb +89 -0
- data/spec/models/page_account_status_spec.rb +89 -0
- data/spec/models/page_account_type_spec.rb +89 -0
- data/spec/models/page_admin_client_spec.rb +89 -0
- data/spec/models/page_aggregation_account_balance_spec.rb +89 -0
- data/spec/models/page_aggregation_account_holding_spec.rb +89 -0
- data/spec/models/page_aggregation_account_spec.rb +89 -0
- data/spec/models/page_aggregation_account_transaction_spec.rb +89 -0
- data/spec/models/page_allocation_composition_spec.rb +89 -0
- data/spec/models/page_allocation_spec.rb +89 -0
- data/spec/models/page_answer_spec.rb +89 -0
- data/spec/models/page_application_spec.rb +89 -0
- data/spec/models/page_audit_log_spec.rb +89 -0
- data/spec/models/page_bank_link_spec.rb +89 -0
- data/spec/models/page_benchmark_spec.rb +89 -0
- data/spec/models/page_budget_spec.rb +89 -0
- data/spec/models/page_business_spec.rb +89 -0
- data/spec/models/page_card_program_spec.rb +89 -0
- data/spec/models/page_card_spec.rb +89 -0
- data/spec/models/page_client_response_spec.rb +89 -0
- data/spec/models/page_client_spec.rb +89 -0
- data/spec/models/page_client_status_spec.rb +89 -0
- data/spec/models/page_customer_revenue_spec.rb +89 -0
- data/spec/models/page_customer_spec.rb +89 -0
- data/spec/models/page_daily_deposit_spec.rb +89 -0
- data/spec/models/page_daily_withdrawal_spec.rb +89 -0
- data/spec/models/page_decision_tree_spec.rb +89 -0
- data/spec/models/page_document_spec.rb +89 -0
- data/spec/models/page_external_account_transfer_spec.rb +89 -0
- data/spec/models/page_feature_spec.rb +89 -0
- data/spec/models/page_feature_track_spec.rb +89 -0
- data/spec/models/page_financial_statement_spec.rb +89 -0
- data/spec/models/page_funding_spec.rb +89 -0
- data/spec/models/page_goal_spec.rb +89 -0
- data/spec/models/page_goal_track_spec.rb +89 -0
- data/spec/models/page_household_spec.rb +89 -0
- data/spec/models/page_invoice_payment_spec.rb +89 -0
- data/spec/models/page_invoice_spec.rb +89 -0
- data/spec/models/page_model_asset_size_spec.rb +89 -0
- data/spec/models/page_model_comment_spec.rb +89 -0
- data/spec/models/page_model_holding_spec.rb +89 -0
- data/spec/models/page_model_spec.rb +89 -0
- data/spec/models/page_model_transaction_spec.rb +89 -0
- data/spec/models/page_mx_merchant_res_spec.rb +89 -0
- data/spec/models/page_node_relationship_spec.rb +89 -0
- data/spec/models/page_node_spec.rb +89 -0
- data/spec/models/page_notification_client_spec.rb +89 -0
- data/spec/models/page_notification_setting_spec.rb +89 -0
- data/spec/models/page_notification_spec.rb +89 -0
- data/spec/models/page_order_bulk_spec.rb +89 -0
- data/spec/models/page_order_spec.rb +89 -0
- data/spec/models/page_order_status_spec.rb +89 -0
- data/spec/models/page_order_track_spec.rb +89 -0
- data/spec/models/page_overflow_settings_spec.rb +89 -0
- data/spec/models/page_overflow_spec.rb +89 -0
- data/spec/models/page_portfolio_asset_size_log_spec.rb +89 -0
- data/spec/models/page_portfolio_comment_spec.rb +89 -0
- data/spec/models/page_portfolio_goal_spec.rb +89 -0
- data/spec/models/page_portfolio_holding_log_spec.rb +89 -0
- data/spec/models/page_portfolio_spec.rb +89 -0
- data/spec/models/page_portfolio_transaction_spec.rb +89 -0
- data/spec/models/page_question_spec.rb +89 -0
- data/spec/models/page_questionnaire_spec.rb +89 -0
- data/spec/models/page_reason_code_spec.rb +89 -0
- data/spec/models/page_risk_profile_spec.rb +89 -0
- data/spec/models/page_roundup_settings_spec.rb +89 -0
- data/spec/models/page_roundup_spec.rb +89 -0
- data/spec/models/page_score_spec.rb +89 -0
- data/spec/models/page_security_exclusion_spec.rb +89 -0
- data/spec/models/page_security_price_spec.rb +89 -0
- data/spec/models/page_security_spec.rb +89 -0
- data/spec/models/page_spending_control_spec.rb +89 -0
- data/spec/models/page_stage_spec.rb +89 -0
- data/spec/models/page_transaction_code_spec.rb +89 -0
- data/spec/models/page_v_account_asset_size_spec.rb +89 -0
- data/spec/models/page_webhook_spec.rb +89 -0
- data/spec/models/permission_vo_spec.rb +51 -0
- data/spec/models/portfolio_asset_size_log_spec.rb +113 -0
- data/spec/models/portfolio_comment_spec.rb +89 -0
- data/spec/models/portfolio_goal_map_spec.rb +47 -0
- data/spec/models/portfolio_goal_spec.rb +77 -0
- data/spec/models/portfolio_holding_agg_spec.rb +77 -0
- data/spec/models/portfolio_holding_log_spec.rb +119 -0
- data/spec/models/portfolio_spec.rb +125 -0
- data/spec/models/portfolio_transaction_spec.rb +215 -0
- data/spec/models/question_spec.rb +131 -0
- data/spec/models/questionnaire_spec.rb +95 -0
- data/spec/models/reason_code_spec.rb +95 -0
- data/spec/models/risk_profile_spec.rb +101 -0
- data/spec/models/roundup_co_spec.rb +65 -0
- data/spec/models/roundup_settings_spec.rb +119 -0
- data/spec/models/roundup_spec.rb +83 -0
- data/spec/models/score_spec.rb +135 -0
- data/spec/models/securities_composition_spec.rb +59 -0
- data/spec/models/securities_country_spec.rb +47 -0
- data/spec/models/security_composition_vo_spec.rb +119 -0
- data/spec/models/security_country_vo_spec.rb +47 -0
- data/spec/models/security_exclusion_spec.rb +101 -0
- data/spec/models/security_price_spec.rb +113 -0
- data/spec/models/security_spec.rb +185 -0
- data/spec/models/sort_spec.rb +71 -0
- data/spec/models/spending_control_spec.rb +119 -0
- data/spec/models/stage_spec.rb +125 -0
- data/spec/models/stat_spec.rb +47 -0
- data/spec/models/state_spec.rb +53 -0
- data/spec/models/statistic_resource_vo_spec.rb +59 -0
- data/spec/models/token_date_request_spec.rb +71 -0
- data/spec/models/transaction_code_spec.rb +125 -0
- data/spec/models/v_account_asset_size_spec.rb +59 -0
- data/spec/models/v_account_vo_spec.rb +71 -0
- data/spec/models/v_client_goal_view_data_spec.rb +71 -0
- data/spec/models/v_portfolio_vo_spec.rb +59 -0
- data/spec/models/webhook_spec.rb +87 -0
- data/spec/spec_helper.rb +111 -0
- metadata +1312 -0
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Hydrogen Nucleus API
|
|
3
|
+
|
|
4
|
+
#The Hydrogen Nucleus API
|
|
5
|
+
|
|
6
|
+
OpenAPI spec version: 1.8.0
|
|
7
|
+
Contact: info@hydrogenplatform.com
|
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
+
Swagger Codegen version: 2.4.18
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'uri'
|
|
14
|
+
|
|
15
|
+
module NucleusApi
|
|
16
|
+
class WebhookApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Create a webhook
|
|
23
|
+
# One active webhook service is allowed at all times.
|
|
24
|
+
# @param webhook_request webhookRequest
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @return [Webhook]
|
|
27
|
+
def create_webhook_using_post(webhook_request, opts = {})
|
|
28
|
+
data, _status_code, _headers = create_webhook_using_post_with_http_info(webhook_request, opts)
|
|
29
|
+
data
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Create a webhook
|
|
33
|
+
# One active webhook service is allowed at all times.
|
|
34
|
+
# @param webhook_request webhookRequest
|
|
35
|
+
# @param [Hash] opts the optional parameters
|
|
36
|
+
# @return [Array<(Webhook, Fixnum, Hash)>] Webhook data, response status code and response headers
|
|
37
|
+
def create_webhook_using_post_with_http_info(webhook_request, opts = {})
|
|
38
|
+
if @api_client.config.debugging
|
|
39
|
+
@api_client.config.logger.debug 'Calling API: WebhookApi.create_webhook_using_post ...'
|
|
40
|
+
end
|
|
41
|
+
# verify the required parameter 'webhook_request' is set
|
|
42
|
+
if @api_client.config.client_side_validation && webhook_request.nil?
|
|
43
|
+
fail ArgumentError, "Missing the required parameter 'webhook_request' when calling WebhookApi.create_webhook_using_post"
|
|
44
|
+
end
|
|
45
|
+
# resource path
|
|
46
|
+
local_var_path = '/webhook'
|
|
47
|
+
|
|
48
|
+
# query parameters
|
|
49
|
+
query_params = {}
|
|
50
|
+
|
|
51
|
+
# header parameters
|
|
52
|
+
header_params = {}
|
|
53
|
+
# HTTP header 'Accept' (if needed)
|
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
|
55
|
+
# HTTP header 'Content-Type'
|
|
56
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
57
|
+
|
|
58
|
+
# form parameters
|
|
59
|
+
form_params = {}
|
|
60
|
+
|
|
61
|
+
# http body (model)
|
|
62
|
+
post_body = @api_client.object_to_http_body(webhook_request)
|
|
63
|
+
auth_names = ['oauth2']
|
|
64
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
65
|
+
:header_params => header_params,
|
|
66
|
+
:query_params => query_params,
|
|
67
|
+
:form_params => form_params,
|
|
68
|
+
:body => post_body,
|
|
69
|
+
:auth_names => auth_names,
|
|
70
|
+
:return_type => 'Webhook')
|
|
71
|
+
if @api_client.config.debugging
|
|
72
|
+
@api_client.config.logger.debug "API called: WebhookApi#create_webhook_using_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
73
|
+
end
|
|
74
|
+
return data, status_code, headers
|
|
75
|
+
end
|
|
76
|
+
# Delete a webhook
|
|
77
|
+
# Permanently delete a webhook for your firm. The webhook_id must be provided.
|
|
78
|
+
# @param webhook_id UUID webhook_id
|
|
79
|
+
# @param [Hash] opts the optional parameters
|
|
80
|
+
# @return [nil]
|
|
81
|
+
def delete_webhook_using_delete(webhook_id, opts = {})
|
|
82
|
+
delete_webhook_using_delete_with_http_info(webhook_id, opts)
|
|
83
|
+
nil
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Delete a webhook
|
|
87
|
+
# Permanently delete a webhook for your firm. The webhook_id must be provided.
|
|
88
|
+
# @param webhook_id UUID webhook_id
|
|
89
|
+
# @param [Hash] opts the optional parameters
|
|
90
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
|
91
|
+
def delete_webhook_using_delete_with_http_info(webhook_id, opts = {})
|
|
92
|
+
if @api_client.config.debugging
|
|
93
|
+
@api_client.config.logger.debug 'Calling API: WebhookApi.delete_webhook_using_delete ...'
|
|
94
|
+
end
|
|
95
|
+
# verify the required parameter 'webhook_id' is set
|
|
96
|
+
if @api_client.config.client_side_validation && webhook_id.nil?
|
|
97
|
+
fail ArgumentError, "Missing the required parameter 'webhook_id' when calling WebhookApi.delete_webhook_using_delete"
|
|
98
|
+
end
|
|
99
|
+
# resource path
|
|
100
|
+
local_var_path = '/webhook/{webhook_id}'.sub('{' + 'webhook_id' + '}', webhook_id.to_s)
|
|
101
|
+
|
|
102
|
+
# query parameters
|
|
103
|
+
query_params = {}
|
|
104
|
+
|
|
105
|
+
# header parameters
|
|
106
|
+
header_params = {}
|
|
107
|
+
# HTTP header 'Accept' (if needed)
|
|
108
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
|
109
|
+
|
|
110
|
+
# form parameters
|
|
111
|
+
form_params = {}
|
|
112
|
+
|
|
113
|
+
# http body (model)
|
|
114
|
+
post_body = nil
|
|
115
|
+
auth_names = ['oauth2']
|
|
116
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
|
117
|
+
:header_params => header_params,
|
|
118
|
+
:query_params => query_params,
|
|
119
|
+
:form_params => form_params,
|
|
120
|
+
:body => post_body,
|
|
121
|
+
:auth_names => auth_names)
|
|
122
|
+
if @api_client.config.debugging
|
|
123
|
+
@api_client.config.logger.debug "API called: WebhookApi#delete_webhook_using_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
124
|
+
end
|
|
125
|
+
return data, status_code, headers
|
|
126
|
+
end
|
|
127
|
+
# List all webhooks
|
|
128
|
+
# Get information for all webhooks defined for your firm.
|
|
129
|
+
# @param [Hash] opts the optional parameters
|
|
130
|
+
# @option opts [BOOLEAN] :ascending ascending (default to false)
|
|
131
|
+
# @option opts [String] :filter filter
|
|
132
|
+
# @option opts [String] :order_by order_by (default to update_date)
|
|
133
|
+
# @option opts [Integer] :page page (default to 0)
|
|
134
|
+
# @option opts [Integer] :size size (default to 25)
|
|
135
|
+
# @return [PageWebhook]
|
|
136
|
+
def get_webhook_all_using_get(opts = {})
|
|
137
|
+
data, _status_code, _headers = get_webhook_all_using_get_with_http_info(opts)
|
|
138
|
+
data
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
# List all webhooks
|
|
142
|
+
# Get information for all webhooks defined for your firm.
|
|
143
|
+
# @param [Hash] opts the optional parameters
|
|
144
|
+
# @option opts [BOOLEAN] :ascending ascending
|
|
145
|
+
# @option opts [String] :filter filter
|
|
146
|
+
# @option opts [String] :order_by order_by
|
|
147
|
+
# @option opts [Integer] :page page
|
|
148
|
+
# @option opts [Integer] :size size
|
|
149
|
+
# @return [Array<(PageWebhook, Fixnum, Hash)>] PageWebhook data, response status code and response headers
|
|
150
|
+
def get_webhook_all_using_get_with_http_info(opts = {})
|
|
151
|
+
if @api_client.config.debugging
|
|
152
|
+
@api_client.config.logger.debug 'Calling API: WebhookApi.get_webhook_all_using_get ...'
|
|
153
|
+
end
|
|
154
|
+
# resource path
|
|
155
|
+
local_var_path = '/webhook'
|
|
156
|
+
|
|
157
|
+
# query parameters
|
|
158
|
+
query_params = {}
|
|
159
|
+
query_params[:'ascending'] = opts[:'ascending'] if !opts[:'ascending'].nil?
|
|
160
|
+
query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
|
|
161
|
+
query_params[:'order_by'] = opts[:'order_by'] if !opts[:'order_by'].nil?
|
|
162
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
163
|
+
query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
|
|
164
|
+
|
|
165
|
+
# header parameters
|
|
166
|
+
header_params = {}
|
|
167
|
+
# HTTP header 'Accept' (if needed)
|
|
168
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
|
169
|
+
|
|
170
|
+
# form parameters
|
|
171
|
+
form_params = {}
|
|
172
|
+
|
|
173
|
+
# http body (model)
|
|
174
|
+
post_body = nil
|
|
175
|
+
auth_names = ['oauth2']
|
|
176
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
177
|
+
:header_params => header_params,
|
|
178
|
+
:query_params => query_params,
|
|
179
|
+
:form_params => form_params,
|
|
180
|
+
:body => post_body,
|
|
181
|
+
:auth_names => auth_names,
|
|
182
|
+
:return_type => 'PageWebhook')
|
|
183
|
+
if @api_client.config.debugging
|
|
184
|
+
@api_client.config.logger.debug "API called: WebhookApi#get_webhook_all_using_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
185
|
+
end
|
|
186
|
+
return data, status_code, headers
|
|
187
|
+
end
|
|
188
|
+
# Retrieve a webhook
|
|
189
|
+
# Retrieve the information for a specific webhook. The webhook_id must be provided.
|
|
190
|
+
# @param webhook_id UUID webhook_id
|
|
191
|
+
# @param [Hash] opts the optional parameters
|
|
192
|
+
# @return [Webhook]
|
|
193
|
+
def get_webhook_using_get(webhook_id, opts = {})
|
|
194
|
+
data, _status_code, _headers = get_webhook_using_get_with_http_info(webhook_id, opts)
|
|
195
|
+
data
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
# Retrieve a webhook
|
|
199
|
+
# Retrieve the information for a specific webhook. The webhook_id must be provided.
|
|
200
|
+
# @param webhook_id UUID webhook_id
|
|
201
|
+
# @param [Hash] opts the optional parameters
|
|
202
|
+
# @return [Array<(Webhook, Fixnum, Hash)>] Webhook data, response status code and response headers
|
|
203
|
+
def get_webhook_using_get_with_http_info(webhook_id, opts = {})
|
|
204
|
+
if @api_client.config.debugging
|
|
205
|
+
@api_client.config.logger.debug 'Calling API: WebhookApi.get_webhook_using_get ...'
|
|
206
|
+
end
|
|
207
|
+
# verify the required parameter 'webhook_id' is set
|
|
208
|
+
if @api_client.config.client_side_validation && webhook_id.nil?
|
|
209
|
+
fail ArgumentError, "Missing the required parameter 'webhook_id' when calling WebhookApi.get_webhook_using_get"
|
|
210
|
+
end
|
|
211
|
+
# resource path
|
|
212
|
+
local_var_path = '/webhook/{webhook_id}'.sub('{' + 'webhook_id' + '}', webhook_id.to_s)
|
|
213
|
+
|
|
214
|
+
# query parameters
|
|
215
|
+
query_params = {}
|
|
216
|
+
|
|
217
|
+
# header parameters
|
|
218
|
+
header_params = {}
|
|
219
|
+
# HTTP header 'Accept' (if needed)
|
|
220
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
|
221
|
+
|
|
222
|
+
# form parameters
|
|
223
|
+
form_params = {}
|
|
224
|
+
|
|
225
|
+
# http body (model)
|
|
226
|
+
post_body = nil
|
|
227
|
+
auth_names = ['oauth2']
|
|
228
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
229
|
+
:header_params => header_params,
|
|
230
|
+
:query_params => query_params,
|
|
231
|
+
:form_params => form_params,
|
|
232
|
+
:body => post_body,
|
|
233
|
+
:auth_names => auth_names,
|
|
234
|
+
:return_type => 'Webhook')
|
|
235
|
+
if @api_client.config.debugging
|
|
236
|
+
@api_client.config.logger.debug "API called: WebhookApi#get_webhook_using_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
237
|
+
end
|
|
238
|
+
return data, status_code, headers
|
|
239
|
+
end
|
|
240
|
+
# Update a webhook
|
|
241
|
+
# Update a webhook for your firm. The webhook_id must be provided
|
|
242
|
+
# @param webhook webhook
|
|
243
|
+
# @param webhook_id UUID webhook_id
|
|
244
|
+
# @param [Hash] opts the optional parameters
|
|
245
|
+
# @return [Webhook]
|
|
246
|
+
def update_webhook_using_put(webhook, webhook_id, opts = {})
|
|
247
|
+
data, _status_code, _headers = update_webhook_using_put_with_http_info(webhook, webhook_id, opts)
|
|
248
|
+
data
|
|
249
|
+
end
|
|
250
|
+
|
|
251
|
+
# Update a webhook
|
|
252
|
+
# Update a webhook for your firm. The webhook_id must be provided
|
|
253
|
+
# @param webhook webhook
|
|
254
|
+
# @param webhook_id UUID webhook_id
|
|
255
|
+
# @param [Hash] opts the optional parameters
|
|
256
|
+
# @return [Array<(Webhook, Fixnum, Hash)>] Webhook data, response status code and response headers
|
|
257
|
+
def update_webhook_using_put_with_http_info(webhook, webhook_id, opts = {})
|
|
258
|
+
if @api_client.config.debugging
|
|
259
|
+
@api_client.config.logger.debug 'Calling API: WebhookApi.update_webhook_using_put ...'
|
|
260
|
+
end
|
|
261
|
+
# verify the required parameter 'webhook' is set
|
|
262
|
+
if @api_client.config.client_side_validation && webhook.nil?
|
|
263
|
+
fail ArgumentError, "Missing the required parameter 'webhook' when calling WebhookApi.update_webhook_using_put"
|
|
264
|
+
end
|
|
265
|
+
# verify the required parameter 'webhook_id' is set
|
|
266
|
+
if @api_client.config.client_side_validation && webhook_id.nil?
|
|
267
|
+
fail ArgumentError, "Missing the required parameter 'webhook_id' when calling WebhookApi.update_webhook_using_put"
|
|
268
|
+
end
|
|
269
|
+
# resource path
|
|
270
|
+
local_var_path = '/webhook/{webhook_id}'.sub('{' + 'webhook_id' + '}', webhook_id.to_s)
|
|
271
|
+
|
|
272
|
+
# query parameters
|
|
273
|
+
query_params = {}
|
|
274
|
+
|
|
275
|
+
# header parameters
|
|
276
|
+
header_params = {}
|
|
277
|
+
# HTTP header 'Accept' (if needed)
|
|
278
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
|
279
|
+
# HTTP header 'Content-Type'
|
|
280
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
281
|
+
|
|
282
|
+
# form parameters
|
|
283
|
+
form_params = {}
|
|
284
|
+
|
|
285
|
+
# http body (model)
|
|
286
|
+
post_body = @api_client.object_to_http_body(webhook)
|
|
287
|
+
auth_names = ['oauth2']
|
|
288
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
|
289
|
+
:header_params => header_params,
|
|
290
|
+
:query_params => query_params,
|
|
291
|
+
:form_params => form_params,
|
|
292
|
+
:body => post_body,
|
|
293
|
+
:auth_names => auth_names,
|
|
294
|
+
:return_type => 'Webhook')
|
|
295
|
+
if @api_client.config.debugging
|
|
296
|
+
@api_client.config.logger.debug "API called: WebhookApi#update_webhook_using_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
297
|
+
end
|
|
298
|
+
return data, status_code, headers
|
|
299
|
+
end
|
|
300
|
+
end
|
|
301
|
+
end
|
|
@@ -0,0 +1,428 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Hydrogen Nucleus API
|
|
3
|
+
|
|
4
|
+
#The Hydrogen Nucleus API
|
|
5
|
+
|
|
6
|
+
OpenAPI spec version: 1.8.0
|
|
7
|
+
Contact: info@hydrogenplatform.com
|
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
+
Swagger Codegen version: 2.4.17
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'logger'
|
|
16
|
+
require 'tempfile'
|
|
17
|
+
require 'typhoeus'
|
|
18
|
+
require 'addressable/uri'
|
|
19
|
+
|
|
20
|
+
module NucleusApi
|
|
21
|
+
class ApiClient
|
|
22
|
+
# The Configuration object holding settings to be used in the API client.
|
|
23
|
+
attr_accessor :config
|
|
24
|
+
|
|
25
|
+
# Defines the headers to be used in HTTP requests of all API calls by default.
|
|
26
|
+
#
|
|
27
|
+
# @return [Hash]
|
|
28
|
+
attr_accessor :default_headers
|
|
29
|
+
|
|
30
|
+
# Initializes the ApiClient
|
|
31
|
+
# @option config [Configuration] Configuration for initializing the object, default to Configuration.default
|
|
32
|
+
def initialize(config = AuthConfiguration.default)
|
|
33
|
+
@config = config.config
|
|
34
|
+
@user_agent = "Swagger-Codegen/#{VERSION}/ruby"
|
|
35
|
+
@default_headers = {
|
|
36
|
+
'Content-Type' => 'application/json',
|
|
37
|
+
'User-Agent' => @user_agent
|
|
38
|
+
}
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
def self.default
|
|
42
|
+
@@default ||= ApiClient.new
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Call an API with given options.
|
|
46
|
+
#
|
|
47
|
+
# @return [Array<(Object, Fixnum, Hash)>] an array of 3 elements:
|
|
48
|
+
# the data deserialized from response body (could be nil), response status code and response headers.
|
|
49
|
+
def call_api(http_method, path, opts = {})
|
|
50
|
+
|
|
51
|
+
request = build_request(http_method, path, false , opts)
|
|
52
|
+
response = request.run
|
|
53
|
+
|
|
54
|
+
if @config.debugging
|
|
55
|
+
@config.logger.debug "HTTP response body ~BEGIN~\n#{response.body}\n~END~\n"
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
unless response.success?
|
|
59
|
+
if response.timed_out?
|
|
60
|
+
fail ApiError.new('Connection timed out')
|
|
61
|
+
elsif response.code == 0
|
|
62
|
+
# Errors from libcurl will be made visible here
|
|
63
|
+
fail ApiError.new(:code => 0,
|
|
64
|
+
:message => response.return_message)
|
|
65
|
+
else
|
|
66
|
+
fail ApiError.new(:code => response.code,
|
|
67
|
+
:response_headers => response.headers.to_h,
|
|
68
|
+
:response_body => response.body),
|
|
69
|
+
response.status_message
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
if opts[:return_type]
|
|
74
|
+
data = deserialize(response, opts[:return_type])
|
|
75
|
+
else
|
|
76
|
+
data = nil
|
|
77
|
+
end
|
|
78
|
+
return data, response.code, response.headers
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
def admin_call_api(http_method, path, opts = {})
|
|
82
|
+
|
|
83
|
+
request = build_request(http_method, path, true, opts)
|
|
84
|
+
response = request.run
|
|
85
|
+
|
|
86
|
+
if @config.debugging
|
|
87
|
+
@config.logger.debug "HTTP response body ~BEGIN~\n#{response.body}\n~END~\n"
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
unless response.success?
|
|
91
|
+
if response.timed_out?
|
|
92
|
+
fail ApiError.new('Connection timed out')
|
|
93
|
+
elsif response.code == 0
|
|
94
|
+
# Errors from libcurl will be made visible here
|
|
95
|
+
fail ApiError.new(:code => 0,
|
|
96
|
+
:message => response.return_message)
|
|
97
|
+
else
|
|
98
|
+
fail ApiError.new(:code => response.code,
|
|
99
|
+
:response_headers => response.headers.to_h,
|
|
100
|
+
:response_body => response.body),
|
|
101
|
+
response.status_message
|
|
102
|
+
end
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
if opts[:return_type]
|
|
106
|
+
data = deserialize(response, opts[:return_type])
|
|
107
|
+
else
|
|
108
|
+
data = nil
|
|
109
|
+
end
|
|
110
|
+
return data, response.code, response.headers
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# Builds the HTTP request
|
|
114
|
+
#
|
|
115
|
+
# @param [String] http_method HTTP method/verb (e.g. POST)
|
|
116
|
+
# @param [String] path URL path (e.g. /account/new)
|
|
117
|
+
# @option opts [Hash] :header_params Header parameters
|
|
118
|
+
# @option opts [Hash] :query_params Query parameters
|
|
119
|
+
# @option opts [Hash] :form_params Query parameters
|
|
120
|
+
# @option opts [Object] :body HTTP body (JSON/XML)
|
|
121
|
+
# @return [Typhoeus::Request] A Typhoeus Request
|
|
122
|
+
def build_request(http_method, path, is_admin, opts = {})
|
|
123
|
+
url = build_request_url(path, is_admin)
|
|
124
|
+
http_method = http_method.to_sym.downcase
|
|
125
|
+
|
|
126
|
+
header_params = @default_headers.merge(opts[:header_params] || {})
|
|
127
|
+
query_params = opts[:query_params] || {}
|
|
128
|
+
form_params = opts[:form_params] || {}
|
|
129
|
+
|
|
130
|
+
update_params_for_auth! header_params, query_params, opts[:auth_names]
|
|
131
|
+
|
|
132
|
+
# set ssl_verifyhosts option based on @config.verify_ssl_host (true/false)
|
|
133
|
+
_verify_ssl_host = @config.verify_ssl_host ? 2 : 0
|
|
134
|
+
|
|
135
|
+
req_opts = {
|
|
136
|
+
:method => http_method,
|
|
137
|
+
:headers => header_params,
|
|
138
|
+
:params => query_params,
|
|
139
|
+
:params_encoding => @config.params_encoding,
|
|
140
|
+
:timeout => @config.timeout,
|
|
141
|
+
:ssl_verifypeer => @config.verify_ssl,
|
|
142
|
+
:ssl_verifyhost => _verify_ssl_host,
|
|
143
|
+
:sslcert => @config.cert_file,
|
|
144
|
+
:sslkey => @config.key_file,
|
|
145
|
+
:verbose => @config.debugging
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
req_opts.merge!(multipart: true) if header_params['Content-Type'].start_with? "multipart/"
|
|
149
|
+
|
|
150
|
+
# set custom cert, if provided
|
|
151
|
+
req_opts[:cainfo] = @config.ssl_ca_cert if @config.ssl_ca_cert
|
|
152
|
+
|
|
153
|
+
if [:post, :patch, :put, :delete].include?(http_method)
|
|
154
|
+
req_body = build_request_body(header_params, form_params, opts[:body])
|
|
155
|
+
req_opts.update :body => req_body
|
|
156
|
+
if @config.debugging
|
|
157
|
+
@config.logger.debug "HTTP request body param ~BEGIN~\n#{req_body}\n~END~\n"
|
|
158
|
+
end
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
request = Typhoeus::Request.new(url, req_opts)
|
|
162
|
+
download_file(request) if opts[:return_type] == 'File'
|
|
163
|
+
request
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
# Check if the given MIME is a JSON MIME.
|
|
167
|
+
# JSON MIME examples:
|
|
168
|
+
# application/json
|
|
169
|
+
# application/json; charset=UTF8
|
|
170
|
+
# APPLICATION/JSON
|
|
171
|
+
# */*
|
|
172
|
+
# @param [String] mime MIME
|
|
173
|
+
# @return [Boolean] True if the MIME is application/json
|
|
174
|
+
def json_mime?(mime)
|
|
175
|
+
(mime == '*/*') || !(mime =~ /Application\/.*json(?!p)(;.*)?/i).nil?
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
# Deserialize the response to the given return type.
|
|
179
|
+
#
|
|
180
|
+
# @param [Response] response HTTP response
|
|
181
|
+
# @param [String] return_type some examples: "User", "Array[User]", "Hash[String,Integer]"
|
|
182
|
+
def deserialize(response, return_type)
|
|
183
|
+
body = response.body
|
|
184
|
+
|
|
185
|
+
# handle file downloading - return the File instance processed in request callbacks
|
|
186
|
+
# note that response body is empty when the file is written in chunks in request on_body callback
|
|
187
|
+
return @tempfile if return_type == 'File'
|
|
188
|
+
|
|
189
|
+
return nil if body.nil? || body.empty?
|
|
190
|
+
|
|
191
|
+
# return response body directly for String return type
|
|
192
|
+
return body if return_type == 'String'
|
|
193
|
+
|
|
194
|
+
# ensuring a default content type
|
|
195
|
+
content_type = response.headers['Content-Type'] || 'application/json'
|
|
196
|
+
|
|
197
|
+
fail "Content-Type is not supported: #{content_type}" unless json_mime?(content_type)
|
|
198
|
+
|
|
199
|
+
begin
|
|
200
|
+
data = JSON.parse("[#{body}]", :symbolize_names => true)[0]
|
|
201
|
+
rescue JSON::ParserError => e
|
|
202
|
+
if %w(String Date DateTime).include?(return_type)
|
|
203
|
+
data = body
|
|
204
|
+
else
|
|
205
|
+
raise e
|
|
206
|
+
end
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
convert_to_type data, return_type
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
# Convert data to the given return type.
|
|
213
|
+
# @param [Object] data Data to be converted
|
|
214
|
+
# @param [String] return_type Return type
|
|
215
|
+
# @return [Mixed] Data in a particular type
|
|
216
|
+
def convert_to_type(data, return_type)
|
|
217
|
+
return nil if data.nil?
|
|
218
|
+
case return_type
|
|
219
|
+
when 'String'
|
|
220
|
+
data.to_s
|
|
221
|
+
when 'Integer'
|
|
222
|
+
data.to_i
|
|
223
|
+
when 'Float'
|
|
224
|
+
data.to_f
|
|
225
|
+
when 'BOOLEAN'
|
|
226
|
+
data == true
|
|
227
|
+
when 'DateTime'
|
|
228
|
+
# parse date time (expecting ISO 8601 format)
|
|
229
|
+
data
|
|
230
|
+
when 'Date'
|
|
231
|
+
# parse date time (expecting ISO 8601 format)
|
|
232
|
+
data
|
|
233
|
+
when 'Object'
|
|
234
|
+
# generic object (usually a Hash), return directly
|
|
235
|
+
data
|
|
236
|
+
when /\AArray<(.+)>\z/
|
|
237
|
+
# e.g. Array<Pet>
|
|
238
|
+
sub_type = $1
|
|
239
|
+
data.map { |item| convert_to_type(item, sub_type) }
|
|
240
|
+
when /\AHash\<String, (.+)\>\z/
|
|
241
|
+
# e.g. Hash<String, Integer>
|
|
242
|
+
sub_type = $1
|
|
243
|
+
{}.tap do |hash|
|
|
244
|
+
data.each { |k, v| hash[k] = convert_to_type(v, sub_type) }
|
|
245
|
+
end
|
|
246
|
+
else
|
|
247
|
+
# models, e.g. Pet
|
|
248
|
+
NucleusApi.const_get(return_type).new.tap do |model|
|
|
249
|
+
model.build_from_hash data
|
|
250
|
+
end
|
|
251
|
+
end
|
|
252
|
+
end
|
|
253
|
+
|
|
254
|
+
# Save response body into a file in (the defined) temporary folder, using the filename
|
|
255
|
+
# from the "Content-Disposition" header if provided, otherwise a random filename.
|
|
256
|
+
# The response body is written to the file in chunks in order to handle files which
|
|
257
|
+
# size is larger than maximum Ruby String or even larger than the maximum memory a Ruby
|
|
258
|
+
# process can use.
|
|
259
|
+
#
|
|
260
|
+
# @see Configuration#temp_folder_path
|
|
261
|
+
def download_file(request)
|
|
262
|
+
tempfile = nil
|
|
263
|
+
encoding = nil
|
|
264
|
+
request.on_headers do |response|
|
|
265
|
+
content_disposition = response.headers['Content-Disposition']
|
|
266
|
+
if content_disposition && content_disposition =~ /filename=/i
|
|
267
|
+
filename = content_disposition[/filename=['"]?([^'"\s]+)['"]?/, 1]
|
|
268
|
+
prefix = sanitize_filename(filename)
|
|
269
|
+
else
|
|
270
|
+
prefix = 'download-'
|
|
271
|
+
end
|
|
272
|
+
prefix = prefix + '-' unless prefix.end_with?('-')
|
|
273
|
+
encoding = response.body.encoding
|
|
274
|
+
tempfile = Tempfile.open(prefix, @config.temp_folder_path, encoding: encoding)
|
|
275
|
+
@tempfile = tempfile
|
|
276
|
+
end
|
|
277
|
+
request.on_body do |chunk|
|
|
278
|
+
chunk.force_encoding(encoding)
|
|
279
|
+
tempfile.write(chunk)
|
|
280
|
+
end
|
|
281
|
+
request.on_complete do |response|
|
|
282
|
+
tempfile.close
|
|
283
|
+
@config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\
|
|
284
|
+
"with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\
|
|
285
|
+
"will be deleted automatically with GC. It's also recommended to delete the temp file "\
|
|
286
|
+
"explicitly with `tempfile.delete`"
|
|
287
|
+
end
|
|
288
|
+
end
|
|
289
|
+
|
|
290
|
+
# Sanitize filename by removing path.
|
|
291
|
+
# e.g. ../../sun.gif becomes sun.gif
|
|
292
|
+
#
|
|
293
|
+
# @param [String] filename the filename to be sanitized
|
|
294
|
+
# @return [String] the sanitized filename
|
|
295
|
+
def sanitize_filename(filename)
|
|
296
|
+
filename.gsub(/.*[\/\\]/, '')
|
|
297
|
+
end
|
|
298
|
+
|
|
299
|
+
def build_request_url(path, is_admin)
|
|
300
|
+
# Add leading and trailing slashes to path
|
|
301
|
+
path = "/#{path}".gsub(/\/+/, '/')
|
|
302
|
+
if is_admin
|
|
303
|
+
Addressable::URI.encode(@config.admin_url + path)
|
|
304
|
+
else
|
|
305
|
+
Addressable::URI.encode(@config.base_url + path)
|
|
306
|
+
end
|
|
307
|
+
end
|
|
308
|
+
|
|
309
|
+
# Builds the HTTP request body
|
|
310
|
+
#
|
|
311
|
+
# @param [Hash] header_params Header parameters
|
|
312
|
+
# @param [Hash] form_params Query parameters
|
|
313
|
+
# @param [Object] body HTTP body (JSON/XML)
|
|
314
|
+
# @return [String] HTTP body data in the form of string
|
|
315
|
+
def build_request_body(header_params, form_params, body)
|
|
316
|
+
# http form
|
|
317
|
+
if header_params['Content-Type'] == 'application/x-www-form-urlencoded' ||
|
|
318
|
+
header_params['Content-Type'] == 'multipart/form-data'
|
|
319
|
+
data = {}
|
|
320
|
+
form_params.each do |key, value|
|
|
321
|
+
case value
|
|
322
|
+
when ::File, ::Array, nil
|
|
323
|
+
# let typhoeus handle File, Array and nil parameters
|
|
324
|
+
data[key] = value
|
|
325
|
+
else
|
|
326
|
+
data[key] = value.to_s
|
|
327
|
+
end
|
|
328
|
+
end
|
|
329
|
+
elsif body
|
|
330
|
+
data = body.is_a?(String) ? body : body.to_json
|
|
331
|
+
else
|
|
332
|
+
data = nil
|
|
333
|
+
end
|
|
334
|
+
data
|
|
335
|
+
end
|
|
336
|
+
|
|
337
|
+
# Update hearder and query params based on authentication settings.
|
|
338
|
+
#
|
|
339
|
+
# @param [Hash] header_params Header parameters
|
|
340
|
+
# @param [Hash] query_params Query parameters
|
|
341
|
+
# @param [String] auth_names Authentication scheme name
|
|
342
|
+
def update_params_for_auth!(header_params, query_params, auth_names)
|
|
343
|
+
Array(auth_names).each do |auth_name|
|
|
344
|
+
auth_setting = @config.auth_settings[auth_name]
|
|
345
|
+
next unless auth_setting
|
|
346
|
+
case auth_setting[:in]
|
|
347
|
+
when 'header' then header_params[auth_setting[:key]] = auth_setting[:value]
|
|
348
|
+
when 'query' then query_params[auth_setting[:key]] = auth_setting[:value]
|
|
349
|
+
else fail ArgumentError, 'Authentication token must be in `query` of `header`'
|
|
350
|
+
end
|
|
351
|
+
end
|
|
352
|
+
end
|
|
353
|
+
|
|
354
|
+
# Sets user agent in HTTP header
|
|
355
|
+
#
|
|
356
|
+
# @param [String] user_agent User agent (e.g. swagger-codegen/ruby/1.0.0)
|
|
357
|
+
def user_agent=(user_agent)
|
|
358
|
+
@user_agent = user_agent
|
|
359
|
+
@default_headers['User-Agent'] = @user_agent
|
|
360
|
+
end
|
|
361
|
+
|
|
362
|
+
# Return Accept header based on an array of accepts provided.
|
|
363
|
+
# @param [Array] accepts array for Accept
|
|
364
|
+
# @return [String] the Accept header (e.g. application/json)
|
|
365
|
+
def select_header_accept(accepts)
|
|
366
|
+
return nil if accepts.nil? || accepts.empty?
|
|
367
|
+
# use JSON when present, otherwise use all of the provided
|
|
368
|
+
json_accept = accepts.find { |s| json_mime?(s) }
|
|
369
|
+
json_accept || accepts.join(',')
|
|
370
|
+
end
|
|
371
|
+
|
|
372
|
+
# Return Content-Type header based on an array of content types provided.
|
|
373
|
+
# @param [Array] content_types array for Content-Type
|
|
374
|
+
# @return [String] the Content-Type header (e.g. application/json)
|
|
375
|
+
def select_header_content_type(content_types)
|
|
376
|
+
# use application/json by default
|
|
377
|
+
return 'application/json' if content_types.nil? || content_types.empty?
|
|
378
|
+
# use JSON when present, otherwise use the first one
|
|
379
|
+
json_content_type = content_types.find { |s| json_mime?(s) }
|
|
380
|
+
json_content_type || content_types.first
|
|
381
|
+
end
|
|
382
|
+
|
|
383
|
+
# Convert object (array, hash, object, etc) to JSON string.
|
|
384
|
+
# @param [Object] model object to be converted into JSON string
|
|
385
|
+
# @return [String] JSON string representation of the object
|
|
386
|
+
def object_to_http_body(model)
|
|
387
|
+
return model if model.nil? || model.is_a?(String)
|
|
388
|
+
local_body = nil
|
|
389
|
+
if model.is_a?(Array)
|
|
390
|
+
local_body = model.map { |m| object_to_hash(m) }
|
|
391
|
+
else
|
|
392
|
+
local_body = object_to_hash(model)
|
|
393
|
+
end
|
|
394
|
+
local_body.to_json
|
|
395
|
+
end
|
|
396
|
+
|
|
397
|
+
# Convert object(non-array) to hash.
|
|
398
|
+
# @param [Object] obj object to be converted into JSON string
|
|
399
|
+
# @return [String] JSON string representation of the object
|
|
400
|
+
def object_to_hash(obj)
|
|
401
|
+
if obj.respond_to?(:to_hash)
|
|
402
|
+
obj.to_hash
|
|
403
|
+
else
|
|
404
|
+
obj
|
|
405
|
+
end
|
|
406
|
+
end
|
|
407
|
+
|
|
408
|
+
# Build parameter value according to the given collection format.
|
|
409
|
+
# @param [String] collection_format one of :csv, :ssv, :tsv, :pipes and :multi
|
|
410
|
+
def build_collection_param(param, collection_format)
|
|
411
|
+
case collection_format
|
|
412
|
+
when :csv
|
|
413
|
+
param.join(',')
|
|
414
|
+
when :ssv
|
|
415
|
+
param.join(' ')
|
|
416
|
+
when :tsv
|
|
417
|
+
param.join("\t")
|
|
418
|
+
when :pipes
|
|
419
|
+
param.join('|')
|
|
420
|
+
when :multi
|
|
421
|
+
# return the array directly as typhoeus will handle it as expected
|
|
422
|
+
param
|
|
423
|
+
else
|
|
424
|
+
fail "unknown collection format: #{collection_format.inspect}"
|
|
425
|
+
end
|
|
426
|
+
end
|
|
427
|
+
end
|
|
428
|
+
end
|