Class: AkamaiApi::ECCU::BaseRequest Abstract
- Inherits:
-
Object
- Object
- AkamaiApi::ECCU::BaseRequest
- Defined in:
- lib/akamai_api/eccu/base_request.rb
Overview
This class is abstract.
This class is intended as a generic superclass for all the specific requests that can be used with the Akamai ECCU interface
Direct Known Subclasses
Instance Method Summary collapse
- #client ⇒ Object protected
-
#client_call(method, *args) ⇒ Object
protected
Executes a method via Savon and returns the response.
-
#with_soap_error_handling(&block) ⇒ Object
protected
Wrapper method that you can use inside your custom ECCU request to handle common errors.
Instance Method Details
#client ⇒ Object (protected)
28 29 30 |
# File 'lib/akamai_api/eccu/base_request.rb', line 28 def client AkamaiApi::ECCU.client end |
#client_call(method, *args) ⇒ Object (protected)
Executes a method via Savon and returns the response
24 25 26 |
# File 'lib/akamai_api/eccu/base_request.rb', line 24 def client_call method, *args client.call(method, *args).body["#{method}_response".to_sym] end |
#with_soap_error_handling(&block) ⇒ Object (protected)
Wrapper method that you can use inside your custom ECCU request to handle common errors
13 14 15 16 17 18 |
# File 'lib/akamai_api/eccu/base_request.rb', line 13 def with_soap_error_handling &block yield rescue Savon::HTTPError => e e = ::AkamaiApi::Unauthorized if e.http.code == 401 raise e end |