Class: Softlayer::Client
- Inherits:
-
Savon::Client
- Object
- Savon::Client
- Softlayer::Client
- Defined in:
- lib/softlayer/client.rb
Class Method Summary collapse
Instance Method Summary collapse
- #call(method, message = {}, hash = nil) ⇒ Object
-
#initialize(service) ⇒ Client
constructor
Create a new client.
Constructor Details
#initialize(service) ⇒ Client
Create a new client.
13 14 15 16 |
# File 'lib/softlayer/client.rb', line 13 def initialize(service) @service = service super client_params end |
Class Method Details
.call(method, message = {}) ⇒ Object
4 5 6 7 8 9 |
# File 'lib/softlayer/client.rb', line 4 def call(method, = {}) safe do resp = super method, message: resp.to_hash["#{method}_response".to_sym]["#{method}_return".to_sym] end end |
Instance Method Details
#call(method, message = {}, hash = nil) ⇒ Object
18 19 20 21 22 23 24 25 26 27 |
# File 'lib/softlayer/client.rb', line 18 def call(method, = {}, hash = nil) safe do if hash.nil? resp = super method, message: else resp = super method, message: , soap_header: hash end resp.to_hash["#{method}_response".to_sym]["#{method}_return".to_sym] end end |