Method: ESP::Suppression#deactivate
- Defined in:
- lib/esp/resources/suppression.rb
#deactivate ⇒ Net::HTTPSuccess, false
Deactivate the current suppression instance. The current object will be updated with the new status if successful. If not successful, populates its errors object.
Once deactivated the suppression cannot be reactivated.
97 98 99 100 101 102 103 104 105 |
# File 'lib/esp/resources/suppression.rb', line 97 def deactivate patch(:deactivate).tap do |response| load_attributes_from_response(response) end rescue ActiveResource::BadRequest, ActiveResource::ResourceInvalid, ActiveResource::UnauthorizedAccess, ActiveResource::ForbiddenAccess => error load_remote_errors(error, true) self.code = error.response.code false end |