Class: UltraVault::SoapService
- Inherits:
-
Object
- Object
- UltraVault::SoapService
- Defined in:
- lib/ultravault/soap_service.rb
Direct Known Subclasses
AgentService, CDPService, DiskSafeService, PolicyService, RecoveryPointService
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
Instance Method Summary collapse
- #extract_params(response_hash, type) ⇒ Object
- #extract_params_array(response_hash, type) ⇒ Object
-
#initialize(service) ⇒ SoapService
constructor
A new instance of SoapService.
Constructor Details
#initialize(service) ⇒ SoapService
Returns a new instance of SoapService.
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/ultravault/soap_service.rb', line 7 def initialize(service) api_request = UltraVault::ApiRequest.new( host: UltraVault.config.host, port: UltraVault.config.port, service: service, api_verison: UltraVault.config.api_version, ssl: UltraVault.config.ssl) @client = UltraVault::Client.new( endpoint: api_request.endpoint, namespace: api_request.namespace, username: UltraVault.config.username, password: UltraVault.config.password) end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
5 6 7 |
# File 'lib/ultravault/soap_service.rb', line 5 def client @client end |
Instance Method Details
#extract_params(response_hash, type) ⇒ Object
19 20 21 22 |
# File 'lib/ultravault/soap_service.rb', line 19 def extract_params(response_hash, type) return response_hash[type][:return] if response_hash[type] nil end |
#extract_params_array(response_hash, type) ⇒ Object
24 25 26 |
# File 'lib/ultravault/soap_service.rb', line 24 def extract_params_array(response_hash, type) [extract_params(response_hash,type)].flatten.compact end |