Class: Keymaker::UpdateNodePropertiesRequest
- Inherits:
-
Request
- Object
- Request
- Keymaker::UpdateNodePropertiesRequest
show all
- Defined in:
- lib/keymaker/requests/update_node_properties_request.rb
Instance Attribute Summary
Attributes inherited from Request
#config, #opts, #service
Instance Method Summary
collapse
Methods inherited from Request
#initialize
Instance Method Details
#node_properties ⇒ Object
16
17
18
|
# File 'lib/keymaker/requests/update_node_properties_request.rb', line 16
def node_properties
opts.except(:node_id)
end
|
#submit ⇒ Object
5
6
7
8
9
10
11
12
13
14
|
# File 'lib/keymaker/requests/update_node_properties_request.rb', line 5
def submit
service.put(node_properties_path(opts[:node_id]), node_properties).on_error do |response|
case response.status
when (400..499)
raise ClientError.new(response, response.body)
when (500..599)
raise ServerError.new(response, response.body)
end
end
end
|