Class: AkamaiApi::ECCU::UpdateAttributeRequest
- Inherits:
-
BaseEditRequest
- Object
- BaseRequest
- BaseEditRequest
- AkamaiApi::ECCU::UpdateAttributeRequest
- Defined in:
- lib/akamai_api/eccu/update_attribute_request.rb
Overview
UpdateAttributeRequest is a generic request class that can be used to update an attribute of an ECCU request.
This class is used to update the AkamaiApi::ECCURequest#notes or the AkamaiApi::ECCURequest#email attributes
Instance Attribute Summary collapse
-
#attribute ⇒ String
readonly
Attribute to update.
Attributes inherited from BaseEditRequest
Class Method Summary collapse
-
.execute(code, attribute, value) ⇒ true, false
Updates an attribute of an ECCU request.
Instance Method Summary collapse
-
#execute(value) ⇒ true, false
Updates an attribute of an ECCU request.
-
#initialize(code, attribute) ⇒ UpdateAttributeRequest
constructor
A new instance of UpdateAttributeRequest.
-
#request_body(notes) ⇒ SoapBody
protected
Creates the request body filling it with all necessary arguments.
Methods inherited from BaseEditRequest
Methods inherited from BaseRequest
#client, #client_call, #with_soap_error_handling
Constructor Details
#initialize(code, attribute) ⇒ UpdateAttributeRequest
Returns a new instance of UpdateAttributeRequest.
32 33 34 35 |
# File 'lib/akamai_api/eccu/update_attribute_request.rb', line 32 def initialize code, attribute super code @attribute = attribute end |
Instance Attribute Details
#attribute ⇒ String (readonly)
Returns attribute to update.
19 20 21 |
# File 'lib/akamai_api/eccu/update_attribute_request.rb', line 19 def attribute @attribute end |
Class Method Details
.execute(code, attribute, value) ⇒ true, false
Updates an attribute of an ECCU request
26 27 28 |
# File 'lib/akamai_api/eccu/update_attribute_request.rb', line 26 def self.execute code, attribute, value new(code, attribute).execute(value) end |
Instance Method Details
#execute(value) ⇒ true, false
Updates an attribute of an ECCU request
40 41 42 43 44 |
# File 'lib/akamai_api/eccu/update_attribute_request.rb', line 40 def execute value with_soap_error_handling do client_call(:"set_#{attribute}", message: request_body(value).to_s)[:success] end end |
#request_body(notes) ⇒ SoapBody (protected)
Creates the request body filling it with all necessary arguments
50 51 52 53 54 |
# File 'lib/akamai_api/eccu/update_attribute_request.rb', line 50 def request_body notes super do |block| block.string attribute_for_soap, notes end end |