hydrogen-nucleus-api 1.9.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +7 -0
- data/README.md +80 -0
- data/Rakefile +8 -0
- data/git_push.sh +55 -0
- data/lib/nucleus_api.rb +306 -0
- data/lib/nucleus_api/api/account_api.rb +1755 -0
- data/lib/nucleus_api/api/admin_client_api.rb +346 -0
- data/lib/nucleus_api/api/aggregation_account_api.rb +1642 -0
- data/lib/nucleus_api/api/allocation_api.rb +824 -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 +526 -0
- data/lib/nucleus_api/api/card_api.rb +864 -0
- data/lib/nucleus_api/api/client_api.rb +1246 -0
- data/lib/nucleus_api/api/contact_api.rb +585 -0
- data/lib/nucleus_api/api/decision_tree_api.rb +911 -0
- data/lib/nucleus_api/api/document_api.rb +301 -0
- data/lib/nucleus_api/api/financial_statement_api.rb +307 -0
- data/lib/nucleus_api/api/funding_api.rb +1213 -0
- data/lib/nucleus_api/api/goal_api.rb +837 -0
- data/lib/nucleus_api/api/household_api.rb +526 -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/order_api.rb +1688 -0
- data/lib/nucleus_api/api/overflow_api.rb +468 -0
- data/lib/nucleus_api/api/portfolio_api.rb +1840 -0
- data/lib/nucleus_api/api/questionnaire_api.rb +857 -0
- data/lib/nucleus_api/api/resource_api.rb +823 -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 +2692 -0
- data/lib/nucleus_api/api/webhook_api.rb +301 -0
- data/lib/nucleus_api/api_client.rb +391 -0
- data/lib/nucleus_api/api_error.rb +38 -0
- data/lib/nucleus_api/auth_configuration.rb +181 -0
- data/lib/nucleus_api/configuration.rb +209 -0
- data/lib/nucleus_api/environment.rb +26 -0
- data/lib/nucleus_api/models/account.rb +335 -0
- data/lib/nucleus_api/models/account_allocation_mapping.rb +295 -0
- data/lib/nucleus_api/models/account_map.rb +203 -0
- data/lib/nucleus_api/models/account_permission_vo.rb +196 -0
- data/lib/nucleus_api/models/account_portfolio_rebalance_request.rb +314 -0
- data/lib/nucleus_api/models/account_status.rb +271 -0
- data/lib/nucleus_api/models/account_type.rb +336 -0
- data/lib/nucleus_api/models/acl_client_permission_vo.rb +237 -0
- data/lib/nucleus_api/models/admin_client.rb +290 -0
- data/lib/nucleus_api/models/aggregation_account.rb +541 -0
- data/lib/nucleus_api/models/aggregation_account_balance.rb +285 -0
- data/lib/nucleus_api/models/aggregation_account_holding.rb +357 -0
- data/lib/nucleus_api/models/aggregation_account_transaction.rb +336 -0
- data/lib/nucleus_api/models/aggregation_accounts_map.rb +203 -0
- data/lib/nucleus_api/models/allocation.rb +326 -0
- data/lib/nucleus_api/models/allocation_aggregated_vo.rb +229 -0
- data/lib/nucleus_api/models/allocation_composition.rb +305 -0
- data/lib/nucleus_api/models/allocation_composition_aggregated_vo.rb +283 -0
- data/lib/nucleus_api/models/allocation_composition_model_holdings_vo.rb +312 -0
- data/lib/nucleus_api/models/allocation_node_map.rb +188 -0
- data/lib/nucleus_api/models/answer.rb +314 -0
- data/lib/nucleus_api/models/answer_map.rb +182 -0
- data/lib/nucleus_api/models/application.rb +257 -0
- data/lib/nucleus_api/models/audit_log.rb +358 -0
- data/lib/nucleus_api/models/available_date_double_vo.rb +244 -0
- data/lib/nucleus_api/models/balances.rb +224 -0
- data/lib/nucleus_api/models/bank_credit.rb +283 -0
- data/lib/nucleus_api/models/bank_link.rb +431 -0
- data/lib/nucleus_api/models/bank_link_map.rb +203 -0
- data/lib/nucleus_api/models/benchmark.rb +278 -0
- data/lib/nucleus_api/models/benchmark_composition.rb +203 -0
- data/lib/nucleus_api/models/brokers.rb +204 -0
- data/lib/nucleus_api/models/budget.rb +383 -0
- data/lib/nucleus_api/models/budget_aggregation_account.rb +188 -0
- data/lib/nucleus_api/models/budget_object.rb +214 -0
- data/lib/nucleus_api/models/bulk_transaction.rb +227 -0
- data/lib/nucleus_api/models/bulk_transaction_vo.rb +218 -0
- data/lib/nucleus_api/models/business.rb +430 -0
- data/lib/nucleus_api/models/business_address.rb +279 -0
- data/lib/nucleus_api/models/business_details_vo.rb +236 -0
- data/lib/nucleus_api/models/card.rb +497 -0
- data/lib/nucleus_api/models/card_address.rb +269 -0
- data/lib/nucleus_api/models/card_balance_vo.rb +214 -0
- data/lib/nucleus_api/models/card_details_vo.rb +284 -0
- data/lib/nucleus_api/models/card_program.rb +351 -0
- data/lib/nucleus_api/models/cash.rb +214 -0
- data/lib/nucleus_api/models/categories_map.rb +203 -0
- data/lib/nucleus_api/models/check.rb +211 -0
- data/lib/nucleus_api/models/check_images.rb +199 -0
- data/lib/nucleus_api/models/client.rb +524 -0
- data/lib/nucleus_api/models/client_account_mapping.rb +213 -0
- data/lib/nucleus_api/models/client_address.rb +279 -0
- data/lib/nucleus_api/models/client_business_card_vo.rb +218 -0
- data/lib/nucleus_api/models/client_business_total_card_balance_vo.rb +204 -0
- data/lib/nucleus_api/models/client_card_vo.rb +244 -0
- data/lib/nucleus_api/models/client_credentials.rb +200 -0
- data/lib/nucleus_api/models/client_relationship.rb +210 -0
- data/lib/nucleus_api/models/client_response.rb +281 -0
- data/lib/nucleus_api/models/client_status.rb +271 -0
- data/lib/nucleus_api/models/client_view_goal_data.rb +303 -0
- data/lib/nucleus_api/models/contact.rb +356 -0
- data/lib/nucleus_api/models/contact_address.rb +269 -0
- data/lib/nucleus_api/models/country.rb +251 -0
- data/lib/nucleus_api/models/currency.rb +213 -0
- data/lib/nucleus_api/models/customer_revenue.rb +297 -0
- data/lib/nucleus_api/models/date_double_vo.rb +204 -0
- data/lib/nucleus_api/models/decision_tree.rb +276 -0
- data/lib/nucleus_api/models/decision_tree_co.rb +203 -0
- data/lib/nucleus_api/models/decision_tree_result_vo.rb +193 -0
- data/lib/nucleus_api/models/document.rb +407 -0
- data/lib/nucleus_api/models/employment.rb +214 -0
- data/lib/nucleus_api/models/external_account_transfer.rb +413 -0
- data/lib/nucleus_api/models/feature.rb +287 -0
- data/lib/nucleus_api/models/feature_track.rb +252 -0
- data/lib/nucleus_api/models/financial_statement.rb +363 -0
- data/lib/nucleus_api/models/funding.rb +509 -0
- data/lib/nucleus_api/models/funding_request_map.rb +188 -0
- data/lib/nucleus_api/models/funding_transaction.rb +391 -0
- data/lib/nucleus_api/models/fx_rate.rb +234 -0
- data/lib/nucleus_api/models/fx_rate_view.rb +234 -0
- data/lib/nucleus_api/models/goal.rb +341 -0
- data/lib/nucleus_api/models/goal_account_mapping.rb +219 -0
- data/lib/nucleus_api/models/goal_track.rb +373 -0
- data/lib/nucleus_api/models/goal_track_accounts.rb +188 -0
- data/lib/nucleus_api/models/household.rb +286 -0
- data/lib/nucleus_api/models/institution.rb +256 -0
- data/lib/nucleus_api/models/investment.rb +279 -0
- data/lib/nucleus_api/models/invoice.rb +473 -0
- data/lib/nucleus_api/models/invoice_payment.rb +282 -0
- data/lib/nucleus_api/models/json_node.rb +173 -0
- data/lib/nucleus_api/models/line_items.rb +279 -0
- data/lib/nucleus_api/models/location.rb +254 -0
- data/lib/nucleus_api/models/member.rb +218 -0
- data/lib/nucleus_api/models/merchant_category_code.rb +229 -0
- data/lib/nucleus_api/models/merchants_map.rb +203 -0
- data/lib/nucleus_api/models/model.rb +397 -0
- data/lib/nucleus_api/models/model_asset_size.rb +275 -0
- data/lib/nucleus_api/models/model_comment.rb +265 -0
- data/lib/nucleus_api/models/model_holding.rb +371 -0
- data/lib/nucleus_api/models/model_holding_vo.rb +209 -0
- data/lib/nucleus_api/models/model_transaction.rb +299 -0
- data/lib/nucleus_api/models/mx_merchant_res.rb +236 -0
- data/lib/nucleus_api/models/node.rb +261 -0
- data/lib/nucleus_api/models/node_relationship.rb +301 -0
- data/lib/nucleus_api/models/notification.rb +314 -0
- data/lib/nucleus_api/models/notification_client.rb +310 -0
- data/lib/nucleus_api/models/notification_setting.rb +301 -0
- data/lib/nucleus_api/models/order.rb +391 -0
- data/lib/nucleus_api/models/order_bulk.rb +310 -0
- data/lib/nucleus_api/models/order_reconcile_request.rb +221 -0
- data/lib/nucleus_api/models/order_reconcile_return_object.rb +228 -0
- data/lib/nucleus_api/models/order_status.rb +251 -0
- data/lib/nucleus_api/models/order_track.rb +317 -0
- data/lib/nucleus_api/models/order_vo_clone.rb +305 -0
- data/lib/nucleus_api/models/overflow.rb +282 -0
- data/lib/nucleus_api/models/overflow_bank_link_map.rb +213 -0
- data/lib/nucleus_api/models/overflow_settings.rb +288 -0
- data/lib/nucleus_api/models/overflow_vo.rb +204 -0
- data/lib/nucleus_api/models/ownership.rb +234 -0
- data/lib/nucleus_api/models/page_account.rb +259 -0
- data/lib/nucleus_api/models/page_account_allocation_mapping.rb +259 -0
- data/lib/nucleus_api/models/page_account_permission_vo.rb +259 -0
- data/lib/nucleus_api/models/page_account_status.rb +259 -0
- data/lib/nucleus_api/models/page_account_type.rb +259 -0
- data/lib/nucleus_api/models/page_admin_client.rb +259 -0
- data/lib/nucleus_api/models/page_aggregation_account.rb +259 -0
- data/lib/nucleus_api/models/page_aggregation_account_balance.rb +259 -0
- data/lib/nucleus_api/models/page_aggregation_account_holding.rb +259 -0
- data/lib/nucleus_api/models/page_aggregation_account_transaction.rb +259 -0
- data/lib/nucleus_api/models/page_allocation.rb +259 -0
- data/lib/nucleus_api/models/page_allocation_composition.rb +259 -0
- data/lib/nucleus_api/models/page_answer.rb +259 -0
- data/lib/nucleus_api/models/page_application.rb +259 -0
- data/lib/nucleus_api/models/page_audit_log.rb +259 -0
- data/lib/nucleus_api/models/page_bank_link.rb +259 -0
- data/lib/nucleus_api/models/page_benchmark.rb +259 -0
- data/lib/nucleus_api/models/page_budget.rb +259 -0
- data/lib/nucleus_api/models/page_business.rb +259 -0
- data/lib/nucleus_api/models/page_card.rb +259 -0
- data/lib/nucleus_api/models/page_card_program.rb +259 -0
- data/lib/nucleus_api/models/page_client.rb +259 -0
- data/lib/nucleus_api/models/page_client_business_card_vo.rb +259 -0
- data/lib/nucleus_api/models/page_client_response.rb +259 -0
- data/lib/nucleus_api/models/page_client_status.rb +259 -0
- data/lib/nucleus_api/models/page_contact.rb +259 -0
- data/lib/nucleus_api/models/page_customer_revenue.rb +259 -0
- data/lib/nucleus_api/models/page_decision_tree.rb +259 -0
- data/lib/nucleus_api/models/page_document.rb +259 -0
- data/lib/nucleus_api/models/page_external_account_transfer.rb +259 -0
- data/lib/nucleus_api/models/page_feature.rb +259 -0
- data/lib/nucleus_api/models/page_feature_track.rb +259 -0
- data/lib/nucleus_api/models/page_financial_statement.rb +259 -0
- data/lib/nucleus_api/models/page_funding.rb +259 -0
- data/lib/nucleus_api/models/page_funding_transaction.rb +259 -0
- data/lib/nucleus_api/models/page_goal.rb +259 -0
- data/lib/nucleus_api/models/page_goal_track.rb +259 -0
- data/lib/nucleus_api/models/page_household.rb +259 -0
- data/lib/nucleus_api/models/page_institution.rb +259 -0
- data/lib/nucleus_api/models/page_invoice.rb +259 -0
- data/lib/nucleus_api/models/page_invoice_payment.rb +259 -0
- data/lib/nucleus_api/models/page_model.rb +259 -0
- data/lib/nucleus_api/models/page_model_asset_size.rb +259 -0
- data/lib/nucleus_api/models/page_model_comment.rb +259 -0
- data/lib/nucleus_api/models/page_model_holding.rb +259 -0
- data/lib/nucleus_api/models/page_model_transaction.rb +259 -0
- data/lib/nucleus_api/models/page_mx_merchant_res.rb +274 -0
- data/lib/nucleus_api/models/page_node.rb +259 -0
- data/lib/nucleus_api/models/page_node_relationship.rb +259 -0
- data/lib/nucleus_api/models/page_notification.rb +259 -0
- data/lib/nucleus_api/models/page_notification_client.rb +259 -0
- data/lib/nucleus_api/models/page_notification_setting.rb +259 -0
- data/lib/nucleus_api/models/page_order.rb +259 -0
- data/lib/nucleus_api/models/page_order_bulk.rb +259 -0
- data/lib/nucleus_api/models/page_order_status.rb +259 -0
- data/lib/nucleus_api/models/page_order_track.rb +259 -0
- data/lib/nucleus_api/models/page_overflow.rb +259 -0
- data/lib/nucleus_api/models/page_overflow_settings.rb +259 -0
- data/lib/nucleus_api/models/page_portfolio.rb +259 -0
- data/lib/nucleus_api/models/page_portfolio_asset_size_log.rb +259 -0
- data/lib/nucleus_api/models/page_portfolio_comment.rb +259 -0
- data/lib/nucleus_api/models/page_portfolio_goal.rb +259 -0
- data/lib/nucleus_api/models/page_portfolio_holding_agg.rb +259 -0
- data/lib/nucleus_api/models/page_portfolio_holding_log.rb +259 -0
- data/lib/nucleus_api/models/page_portfolio_transaction.rb +259 -0
- data/lib/nucleus_api/models/page_question.rb +259 -0
- data/lib/nucleus_api/models/page_questionnaire.rb +259 -0
- data/lib/nucleus_api/models/page_reason_code.rb +259 -0
- data/lib/nucleus_api/models/page_risk_profile.rb +259 -0
- data/lib/nucleus_api/models/page_roundup.rb +259 -0
- data/lib/nucleus_api/models/page_roundup_settings.rb +259 -0
- data/lib/nucleus_api/models/page_score.rb +259 -0
- data/lib/nucleus_api/models/page_security.rb +259 -0
- data/lib/nucleus_api/models/page_security_exclusion.rb +259 -0
- data/lib/nucleus_api/models/page_security_price.rb +259 -0
- data/lib/nucleus_api/models/page_spending_control.rb +259 -0
- data/lib/nucleus_api/models/page_stage.rb +259 -0
- data/lib/nucleus_api/models/page_transaction_code.rb +259 -0
- data/lib/nucleus_api/models/page_webhook.rb +259 -0
- data/lib/nucleus_api/models/pageable.rb +227 -0
- data/lib/nucleus_api/models/permission_vo.rb +227 -0
- data/lib/nucleus_api/models/portfolio.rb +337 -0
- data/lib/nucleus_api/models/portfolio_asset_size_log.rb +330 -0
- data/lib/nucleus_api/models/portfolio_comment.rb +280 -0
- data/lib/nucleus_api/models/portfolio_goal.rb +256 -0
- data/lib/nucleus_api/models/portfolio_goal_map.rb +203 -0
- data/lib/nucleus_api/models/portfolio_holding_agg.rb +244 -0
- data/lib/nucleus_api/models/portfolio_holding_log.rb +340 -0
- data/lib/nucleus_api/models/portfolio_transaction.rb +536 -0
- data/lib/nucleus_api/models/question.rb +362 -0
- data/lib/nucleus_api/models/questionnaire.rb +288 -0
- data/lib/nucleus_api/models/reason_code.rb +275 -0
- data/lib/nucleus_api/models/risk_profile.rb +287 -0
- data/lib/nucleus_api/models/roundup.rb +267 -0
- data/lib/nucleus_api/models/roundup_co.rb +233 -0
- data/lib/nucleus_api/models/roundup_settings.rb +332 -0
- data/lib/nucleus_api/models/score.rb +375 -0
- data/lib/nucleus_api/models/securities_composition.rb +233 -0
- data/lib/nucleus_api/models/securities_country.rb +203 -0
- data/lib/nucleus_api/models/security.rb +435 -0
- data/lib/nucleus_api/models/security_composition_vo.rb +301 -0
- data/lib/nucleus_api/models/security_country_vo.rb +191 -0
- data/lib/nucleus_api/models/security_exclusion.rb +301 -0
- data/lib/nucleus_api/models/security_price.rb +314 -0
- data/lib/nucleus_api/models/sort.rb +234 -0
- data/lib/nucleus_api/models/spending_control.rb +343 -0
- data/lib/nucleus_api/models/stage.rb +346 -0
- data/lib/nucleus_api/models/stat.rb +204 -0
- data/lib/nucleus_api/models/state.rb +203 -0
- data/lib/nucleus_api/models/statistic_resource_vo.rb +209 -0
- data/lib/nucleus_api/models/token_date_request.rb +234 -0
- data/lib/nucleus_api/models/transaction_code.rb +313 -0
- data/lib/nucleus_api/models/v_account_vo.rb +227 -0
- data/lib/nucleus_api/models/v_client_goal_view_data.rb +229 -0
- data/lib/nucleus_api/models/v_portfolio_vo.rb +209 -0
- data/lib/nucleus_api/models/webhook.rb +278 -0
- data/lib/nucleus_api/version.rb +15 -0
- data/nucleus_api.gemspec +46 -0
- data/spec/api/account_api_spec.rb +445 -0
- data/spec/api/admin_client_api_spec.rb +107 -0
- data/spec/api/aggregation_account_api_spec.rb +412 -0
- data/spec/api/allocation_api_spec.rb +225 -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 +159 -0
- data/spec/api/card_api_spec.rb +239 -0
- data/spec/api/client_api_spec.rb +327 -0
- data/spec/api/contact_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/financial_statement_api_spec.rb +102 -0
- data/spec/api/funding_api_spec.rb +315 -0
- data/spec/api/goal_api_spec.rb +231 -0
- data/spec/api/household_api_spec.rb +159 -0
- data/spec/api/invoice_api_spec.rb +169 -0
- data/spec/api/model_api_spec.rb +375 -0
- data/spec/api/order_api_spec.rb +412 -0
- data/spec/api/overflow_api_spec.rb +140 -0
- data/spec/api/portfolio_api_spec.rb +464 -0
- data/spec/api/questionnaire_api_spec.rb +230 -0
- data/spec/api/resource_api_spec.rb +229 -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 +660 -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 +113 -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 +251 -0
- data/spec/models/aggregation_account_transaction_spec.rb +131 -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 +119 -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/balances_spec.rb +65 -0
- data/spec/models/bank_credit_spec.rb +95 -0
- data/spec/models/bank_link_map_spec.rb +47 -0
- data/spec/models/bank_link_spec.rb +179 -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 +149 -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_details_vo_spec.rb +71 -0
- data/spec/models/business_spec.rb +185 -0
- data/spec/models/card_address_spec.rb +77 -0
- data/spec/models/card_balance_vo_spec.rb +59 -0
- data/spec/models/card_details_vo_spec.rb +101 -0
- data/spec/models/card_program_spec.rb +131 -0
- data/spec/models/card_spec.rb +215 -0
- data/spec/models/cash_spec.rb +53 -0
- data/spec/models/categories_map_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_business_card_vo_spec.rb +59 -0
- data/spec/models/client_business_total_card_balance_vo_spec.rb +53 -0
- data/spec/models/client_card_vo_spec.rb +77 -0
- data/spec/models/client_credentials_spec.rb +53 -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/contact_address_spec.rb +77 -0
- data/spec/models/contact_spec.rb +143 -0
- data/spec/models/country_spec.rb +71 -0
- data/spec/models/currency_spec.rb +59 -0
- data/spec/models/customer_revenue_spec.rb +95 -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 +137 -0
- data/spec/models/funding_request_map_spec.rb +41 -0
- data/spec/models/funding_spec.rb +221 -0
- data/spec/models/funding_transaction_spec.rb +155 -0
- data/spec/models/fx_rate_spec.rb +59 -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/institution_spec.rb +83 -0
- data/spec/models/investment_spec.rb +89 -0
- data/spec/models/invoice_payment_spec.rb +89 -0
- data/spec/models/invoice_spec.rb +197 -0
- data/spec/models/json_node_spec.rb +35 -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 +65 -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 +53 -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_business_card_vo_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_contact_spec.rb +89 -0
- data/spec/models/page_customer_revenue_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_funding_transaction_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_institution_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 +101 -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_agg_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_webhook_spec.rb +89 -0
- data/spec/models/pageable_spec.rb +71 -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 +239 -0
- data/spec/models/question_spec.rb +149 -0
- data/spec/models/questionnaire_spec.rb +101 -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 +125 -0
- data/spec/models/stage_spec.rb +137 -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 +119 -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 +1059 -0
@@ -0,0 +1,38 @@
|
|
1
|
+
=begin
|
2
|
+
#Hydrogen Nucleus API
|
3
|
+
|
4
|
+
#The Hydrogen Nucleus API
|
5
|
+
|
6
|
+
OpenAPI spec version: 1.9.2
|
7
|
+
Contact: info@hydrogenplatform.com
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.19
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
module NucleusApi
|
14
|
+
class ApiError < StandardError
|
15
|
+
attr_reader :code, :response_headers, :response_body
|
16
|
+
|
17
|
+
# Usage examples:
|
18
|
+
# ApiError.new
|
19
|
+
# ApiError.new("message")
|
20
|
+
# ApiError.new(:code => 500, :response_headers => {}, :response_body => "")
|
21
|
+
# ApiError.new(:code => 404, :message => "Not Found")
|
22
|
+
def initialize(arg = nil)
|
23
|
+
if arg.is_a? Hash
|
24
|
+
if arg.key?(:message) || arg.key?('message')
|
25
|
+
super(arg[:message] || arg['message'])
|
26
|
+
else
|
27
|
+
super arg
|
28
|
+
end
|
29
|
+
|
30
|
+
arg.each do |k, v|
|
31
|
+
instance_variable_set "@#{k}", v
|
32
|
+
end
|
33
|
+
else
|
34
|
+
super arg
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,181 @@
|
|
1
|
+
=begin
|
2
|
+
#Hydrogen Atom API
|
3
|
+
|
4
|
+
#The Hydrogen Atom API
|
5
|
+
|
6
|
+
OpenAPI spec version: 1.7.0
|
7
|
+
Contact: info@hydrogenplatform.com
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.13
|
10
|
+
|
11
|
+
=end
|
12
|
+
require 'date'
|
13
|
+
require 'json'
|
14
|
+
require 'logger'
|
15
|
+
require 'tempfile'
|
16
|
+
require 'typhoeus'
|
17
|
+
require 'uri'
|
18
|
+
module NucleusApi
|
19
|
+
class AuthConfiguration < Configuration
|
20
|
+
attr_accessor :authorization
|
21
|
+
attr_accessor :client_token
|
22
|
+
attr_accessor :grant_type_key
|
23
|
+
attr_accessor :client_credentials
|
24
|
+
attr_accessor :password
|
25
|
+
attr_accessor :username
|
26
|
+
attr_accessor :application_json_value
|
27
|
+
attr_accessor :auth_uri
|
28
|
+
attr_accessor :client_token_auth_uri
|
29
|
+
attr_accessor :config
|
30
|
+
attr_accessor :bearer
|
31
|
+
attr_accessor :base_url
|
32
|
+
def initialize
|
33
|
+
super
|
34
|
+
@authorization = 'Authorization'
|
35
|
+
@client_token = 'Client-Token'
|
36
|
+
@grant_type_key = 'grant_type'
|
37
|
+
@client_credentials = 'client_credentials'
|
38
|
+
@password = 'password'
|
39
|
+
@username = 'username'
|
40
|
+
@application_json_value = 'application/json'
|
41
|
+
@auth_uri = '/authorization/v1/oauth/token'
|
42
|
+
@client_token_auth_uri = '/authorization/v1/client-token'
|
43
|
+
@bearer = 'Bearer '
|
44
|
+
@config = Configuration.default
|
45
|
+
yield(self) if block_given?
|
46
|
+
end
|
47
|
+
|
48
|
+
def self.default
|
49
|
+
@@default ||= AuthConfiguration.new
|
50
|
+
end
|
51
|
+
|
52
|
+
def configure
|
53
|
+
yield(self) if block_given?
|
54
|
+
end
|
55
|
+
|
56
|
+
def set_base_url(base_url)
|
57
|
+
@config.host = base_url
|
58
|
+
end
|
59
|
+
|
60
|
+
def auth_url(host)
|
61
|
+
url = "#{scheme}://#{[host, auth_uri].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '')
|
62
|
+
URI.encode(url)
|
63
|
+
end
|
64
|
+
|
65
|
+
def client_token_auth_url(host)
|
66
|
+
url = "#{scheme}://#{[host, client_token_auth_uri].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '')
|
67
|
+
URI.encode(url)
|
68
|
+
end
|
69
|
+
|
70
|
+
def create_client_token_credential(client_id, client_secret, client_token)
|
71
|
+
basic_cred = 'Basic ' + ["#{client_id}:#{client_secret}"].pack('m').delete("\r\n")
|
72
|
+
header_params = {}
|
73
|
+
header_params[@authorization] = basic_cred;
|
74
|
+
header_params[@client_token] = @bearer + client_token;
|
75
|
+
response = Typhoeus::Request.new(
|
76
|
+
client_token_auth_url(@config.host),
|
77
|
+
:method => :post,
|
78
|
+
:headers => header_params,
|
79
|
+
:params => nil
|
80
|
+
).run
|
81
|
+
|
82
|
+
if @debugging
|
83
|
+
@logger.debug "HTTP response body ~BEGIN~\n#{response.body}\n~END~\n"
|
84
|
+
end
|
85
|
+
body = JSON.parse(response.body)
|
86
|
+
unless response.success?
|
87
|
+
if response.timed_out?
|
88
|
+
raise ApiError.new('Connection timed out')
|
89
|
+
elsif response.code == 0
|
90
|
+
# Errors from libcurl will be made visible here
|
91
|
+
raise ApiError.new(:code => 0,
|
92
|
+
:message => response.return_message)
|
93
|
+
else
|
94
|
+
raise ApiError.new(:code => response.code,
|
95
|
+
:response_headers => response.headers,
|
96
|
+
:response_body => response.body), response.body
|
97
|
+
end
|
98
|
+
end
|
99
|
+
@config.access_token = body['access_token']
|
100
|
+
end
|
101
|
+
|
102
|
+
def create_client_credential(client_id, client_secret)
|
103
|
+
basic_cred = 'Basic ' + ["#{client_id}:#{client_secret}"].pack('m').delete("\r\n")
|
104
|
+
# Request Params
|
105
|
+
params = {}
|
106
|
+
params[@grant_type_key] = @client_credentials
|
107
|
+
# Header parameters
|
108
|
+
header_params = {}
|
109
|
+
header_params['Accept'] = '*/*'
|
110
|
+
header_params['Content-Type'] = 'application/json'
|
111
|
+
header_params[@authorization] = basic_cred
|
112
|
+
response = Typhoeus::Request.new(
|
113
|
+
auth_url(@config.host),
|
114
|
+
:method => :post,
|
115
|
+
:headers => header_params,
|
116
|
+
:params => params
|
117
|
+
).run
|
118
|
+
|
119
|
+
if @debugging
|
120
|
+
@logger.debug "HTTP response body ~BEGIN~\n#{response.body}\n~END~\n"
|
121
|
+
end
|
122
|
+
body = JSON.parse(response.body)
|
123
|
+
unless response.success?
|
124
|
+
if response.timed_out?
|
125
|
+
raise ApiError.new('Connection timed out')
|
126
|
+
elsif response.code == 0
|
127
|
+
# Errors from libcurl will be made visible here
|
128
|
+
raise ApiError.new(:code => 0,
|
129
|
+
:message => response.return_message)
|
130
|
+
else
|
131
|
+
raise ApiError.new(:code => response.code,
|
132
|
+
:response_headers => response.headers,
|
133
|
+
:response_body => response.body), response.body
|
134
|
+
end
|
135
|
+
end
|
136
|
+
@config.access_token = body['access_token']
|
137
|
+
end
|
138
|
+
|
139
|
+
def set_access_token(token)
|
140
|
+
@config.access_token = token
|
141
|
+
end
|
142
|
+
|
143
|
+
def create_password_credential(client_id, client_secret, username, password)
|
144
|
+
basic_cred = 'Basic ' + ["#{client_id}:#{client_secret}"].pack('m').delete("\r\n")
|
145
|
+
# Request Params
|
146
|
+
params = {}
|
147
|
+
params[@grant_type_key] = @password
|
148
|
+
params[@username] = username
|
149
|
+
params[@password] = password
|
150
|
+
# header parameters
|
151
|
+
header_params = {}
|
152
|
+
header_params['Accept'] = '*/*'
|
153
|
+
header_params['Content-Type'] = 'application/json'
|
154
|
+
header_params[@authorization] = basic_cred
|
155
|
+
response = Typhoeus::Request.new(
|
156
|
+
auth_url(@config.host),
|
157
|
+
:method => :post,
|
158
|
+
:headers => header_params,
|
159
|
+
:params => params
|
160
|
+
).run
|
161
|
+
if @debugging
|
162
|
+
@logger.debug "HTTP response body ~BEGIN~\n#{response.body}\n~END~\n"
|
163
|
+
end
|
164
|
+
body = JSON.parse(response.body)
|
165
|
+
unless response.success?
|
166
|
+
if response.timed_out?
|
167
|
+
raise ApiError.new('Connection timed out')
|
168
|
+
elsif response.code == 0
|
169
|
+
# Errors from libcurl will be made visible here
|
170
|
+
raise ApiError.new(:code => 0,
|
171
|
+
:message => response.return_message)
|
172
|
+
else
|
173
|
+
raise ApiError.new(:code => response.code,
|
174
|
+
:response_headers => response.headers,
|
175
|
+
:response_body => response.body), body
|
176
|
+
end
|
177
|
+
end
|
178
|
+
@config.access_token = body['access_token']
|
179
|
+
end
|
180
|
+
end
|
181
|
+
end
|
@@ -0,0 +1,209 @@
|
|
1
|
+
=begin
|
2
|
+
#Hydrogen Nucleus API
|
3
|
+
|
4
|
+
#The Hydrogen Nucleus API
|
5
|
+
|
6
|
+
OpenAPI spec version: 1.9.2
|
7
|
+
Contact: info@hydrogenplatform.com
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.19
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'addressable/uri'
|
14
|
+
|
15
|
+
module NucleusApi
|
16
|
+
class Configuration
|
17
|
+
# Defines url scheme
|
18
|
+
attr_accessor :scheme
|
19
|
+
|
20
|
+
# Defines url host
|
21
|
+
attr_accessor :host
|
22
|
+
|
23
|
+
# Defines url base path
|
24
|
+
attr_accessor :base_path
|
25
|
+
|
26
|
+
# Defines API keys used with API Key authentications.
|
27
|
+
#
|
28
|
+
# @return [Hash] key: parameter name, value: parameter value (API key)
|
29
|
+
#
|
30
|
+
# @example parameter name is "api_key", API key is "xxx" (e.g. "api_key=xxx" in query string)
|
31
|
+
# config.api_key['api_key'] = 'xxx'
|
32
|
+
attr_accessor :api_key
|
33
|
+
|
34
|
+
# Defines API key prefixes used with API Key authentications.
|
35
|
+
#
|
36
|
+
# @return [Hash] key: parameter name, value: API key prefix
|
37
|
+
#
|
38
|
+
# @example parameter name is "Authorization", API key prefix is "Token" (e.g. "Authorization: Token xxx" in headers)
|
39
|
+
# config.api_key_prefix['api_key'] = 'Token'
|
40
|
+
attr_accessor :api_key_prefix
|
41
|
+
|
42
|
+
# Defines the username used with HTTP basic authentication.
|
43
|
+
#
|
44
|
+
# @return [String]
|
45
|
+
attr_accessor :username
|
46
|
+
|
47
|
+
# Defines the password used with HTTP basic authentication.
|
48
|
+
#
|
49
|
+
# @return [String]
|
50
|
+
attr_accessor :password
|
51
|
+
|
52
|
+
# Defines the access token (Bearer) used with OAuth2.
|
53
|
+
attr_accessor :access_token
|
54
|
+
|
55
|
+
# Set this to enable/disable debugging. When enabled (set to true), HTTP request/response
|
56
|
+
# details will be logged with `logger.debug` (see the `logger` attribute).
|
57
|
+
# Default to false.
|
58
|
+
#
|
59
|
+
# @return [true, false]
|
60
|
+
attr_accessor :debugging
|
61
|
+
|
62
|
+
# Defines the logger used for debugging.
|
63
|
+
# Default to `Rails.logger` (when in Rails) or logging to STDOUT.
|
64
|
+
#
|
65
|
+
# @return [#debug]
|
66
|
+
attr_accessor :logger
|
67
|
+
|
68
|
+
# Defines the temporary folder to store downloaded files
|
69
|
+
# (for API endpoints that have file response).
|
70
|
+
# Default to use `Tempfile`.
|
71
|
+
#
|
72
|
+
# @return [String]
|
73
|
+
attr_accessor :temp_folder_path
|
74
|
+
|
75
|
+
# The time limit for HTTP request in seconds.
|
76
|
+
# Default to 0 (never times out).
|
77
|
+
attr_accessor :timeout
|
78
|
+
|
79
|
+
# Set this to false to skip client side validation in the operation.
|
80
|
+
# Default to true.
|
81
|
+
# @return [true, false]
|
82
|
+
attr_accessor :client_side_validation
|
83
|
+
|
84
|
+
### TLS/SSL setting
|
85
|
+
# Set this to false to skip verifying SSL certificate when calling API from https server.
|
86
|
+
# Default to true.
|
87
|
+
#
|
88
|
+
# @note Do NOT set it to false in production code, otherwise you would face multiple types of cryptographic attacks.
|
89
|
+
#
|
90
|
+
# @return [true, false]
|
91
|
+
attr_accessor :verify_ssl
|
92
|
+
|
93
|
+
### TLS/SSL setting
|
94
|
+
# Set this to false to skip verifying SSL host name
|
95
|
+
# Default to true.
|
96
|
+
#
|
97
|
+
# @note Do NOT set it to false in production code, otherwise you would face multiple types of cryptographic attacks.
|
98
|
+
#
|
99
|
+
# @return [true, false]
|
100
|
+
attr_accessor :verify_ssl_host
|
101
|
+
|
102
|
+
### TLS/SSL setting
|
103
|
+
# Set this to customize the certificate file to verify the peer.
|
104
|
+
#
|
105
|
+
# @return [String] the path to the certificate file
|
106
|
+
#
|
107
|
+
# @see The `cainfo` option of Typhoeus, `--cert` option of libcurl. Related source code:
|
108
|
+
# https://github.com/typhoeus/typhoeus/blob/master/lib/typhoeus/easy_factory.rb#L145
|
109
|
+
attr_accessor :ssl_ca_cert
|
110
|
+
|
111
|
+
### TLS/SSL setting
|
112
|
+
# Client certificate file (for client certificate)
|
113
|
+
attr_accessor :cert_file
|
114
|
+
|
115
|
+
### TLS/SSL setting
|
116
|
+
# Client private key file (for client certificate)
|
117
|
+
attr_accessor :key_file
|
118
|
+
|
119
|
+
# Set this to customize parameters encoding of array parameter with multi collectionFormat.
|
120
|
+
# Default to nil.
|
121
|
+
#
|
122
|
+
# @see The params_encoding option of Ethon. Related source code:
|
123
|
+
# https://github.com/typhoeus/ethon/blob/master/lib/ethon/easy/queryable.rb#L96
|
124
|
+
attr_accessor :params_encoding
|
125
|
+
|
126
|
+
attr_accessor :inject_format
|
127
|
+
|
128
|
+
attr_accessor :force_ending_format
|
129
|
+
|
130
|
+
def initialize
|
131
|
+
@scheme = 'https'
|
132
|
+
@host = 'api.hydrogenplatform.com'
|
133
|
+
@base_path = '/'
|
134
|
+
@api_key = {}
|
135
|
+
@api_key_prefix = {}
|
136
|
+
@timeout = 0
|
137
|
+
@client_side_validation = true
|
138
|
+
@verify_ssl = true
|
139
|
+
@verify_ssl_host = true
|
140
|
+
@params_encoding = nil
|
141
|
+
@cert_file = nil
|
142
|
+
@key_file = nil
|
143
|
+
@debugging = false
|
144
|
+
@inject_format = false
|
145
|
+
@force_ending_format = false
|
146
|
+
@logger = defined?(Rails) ? Rails.logger : Logger.new(STDOUT)
|
147
|
+
|
148
|
+
yield(self) if block_given?
|
149
|
+
end
|
150
|
+
|
151
|
+
# The default Configuration object.
|
152
|
+
def self.default
|
153
|
+
@@default ||= Configuration.new
|
154
|
+
end
|
155
|
+
|
156
|
+
def configure
|
157
|
+
yield(self) if block_given?
|
158
|
+
end
|
159
|
+
|
160
|
+
def scheme=(scheme)
|
161
|
+
# remove :// from scheme
|
162
|
+
@scheme = scheme.sub(/:\/\//, '')
|
163
|
+
end
|
164
|
+
|
165
|
+
def host=(host)
|
166
|
+
# remove http(s):// and anything after a slash
|
167
|
+
@host = host.sub(/https?:\/\//, '').split('/').first
|
168
|
+
end
|
169
|
+
|
170
|
+
def base_path=(base_path)
|
171
|
+
# Add leading and trailing slashes to base_path
|
172
|
+
@base_path = "/#{base_path}".gsub(/\/+/, '/')
|
173
|
+
@base_path = '' if @base_path == '/'
|
174
|
+
end
|
175
|
+
|
176
|
+
def base_url
|
177
|
+
url = "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '')
|
178
|
+
Addressable::URI.encode(url)
|
179
|
+
end
|
180
|
+
|
181
|
+
# Gets API key (with prefix if set).
|
182
|
+
# @param [String] param_name the parameter name of API key auth
|
183
|
+
def api_key_with_prefix(param_name)
|
184
|
+
if @api_key_prefix[param_name]
|
185
|
+
"#{@api_key_prefix[param_name]} #{@api_key[param_name]}"
|
186
|
+
else
|
187
|
+
@api_key[param_name]
|
188
|
+
end
|
189
|
+
end
|
190
|
+
|
191
|
+
# Gets Basic Auth token string
|
192
|
+
def basic_auth_token
|
193
|
+
'Basic ' + ["#{username}:#{password}"].pack('m').delete("\r\n")
|
194
|
+
end
|
195
|
+
|
196
|
+
# Returns Auth Settings hash for api client.
|
197
|
+
def auth_settings
|
198
|
+
{
|
199
|
+
'oauth2' =>
|
200
|
+
{
|
201
|
+
type: 'oauth2',
|
202
|
+
in: 'header',
|
203
|
+
key: 'Authorization',
|
204
|
+
value: "Bearer #{access_token}"
|
205
|
+
},
|
206
|
+
}
|
207
|
+
end
|
208
|
+
end
|
209
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
|
2
|
+
require 'uri'
|
3
|
+
|
4
|
+
module NucleusApi
|
5
|
+
class Environment
|
6
|
+
attr_accessor :api_client
|
7
|
+
attr_accessor :auth_config
|
8
|
+
attr_accessor :SANDBOX
|
9
|
+
attr_accessor :PRODUCTION
|
10
|
+
def initialize(api_client = ApiClient.default, config = Configuration.default, auth_config = AuthConfiguration.default)
|
11
|
+
@api_client = api_client
|
12
|
+
@config = config
|
13
|
+
@auth_config = auth_config
|
14
|
+
@SANDBOX = 'sandbox.hydrogenplatform.com'
|
15
|
+
@PRODUCTION = 'api.hydrogenplatform.com'
|
16
|
+
end
|
17
|
+
|
18
|
+
def set_environment(host)
|
19
|
+
if (host)
|
20
|
+
@config.config.host=host
|
21
|
+
@api_client.config.host=host
|
22
|
+
@auth_config.set_base_url(host)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|