Method: Verizon::AnomalySettingsController#activate_anomaly_detection
- Defined in:
- lib/verizon/controllers/anomaly_settings_controller.rb
#activate_anomaly_detection(body) ⇒ IntelligenceSuccessResult
Uses the subscribed account ID to activate anomaly detection and set threshold values. activate anomaly detection.
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/verizon/controllers/anomaly_settings_controller.rb', line 14 def activate_anomaly_detection(body) new_api_call_builder .request(new_request_builder(HttpMethodEnum::POST, '/m2m/v1/intelligence/anomaly/settings', Server::THINGSPACE) .header_param(new_parameter('application/json', key: 'Content-Type')) .body_param(new_parameter(body)) .header_param(new_parameter('application/json', key: 'accept')) .body_serializer(proc do |param| param.to_json unless param.nil? end) .auth(Single.new('thingspace_oauth'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(IntelligenceSuccessResult.method(:from_hash)) .is_api_response(true) .local_error('default', 'An error occurred.', IntelligenceResultException)) .execute end |