Module: Castle::API::StartImpersonation
- Defined in:
- lib/castle/api/start_impersonation.rb
Overview
Sends POST impersonate request
Class Method Summary collapse
Class Method Details
.call(options = {}) ⇒ Object
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/castle/api/start_impersonation.rb', line 9 def call( = {}) = Castle::Utils::DeepSymbolizeKeys.call( || {}) unless [:no_symbolize] .delete(:no_symbolize) http = .delete(:http) config = .delete(:config) || Castle.config Castle::API .call(Castle::Commands::StartImpersonation.build(), {}, http, config) .tap { |response| raise Castle::ImpersonationFailed unless response[:success] } end |