Class: MistApi::UtilitiesWiFi
- Inherits:
-
BaseController
- Object
- BaseController
- MistApi::UtilitiesWiFi
- Defined in:
- lib/mist_api/controllers/utilities_wi_fi.rb
Overview
UtilitiesWiFi
Constant Summary
Constants inherited from BaseController
Instance Attribute Summary
Attributes inherited from BaseController
Instance Method Summary collapse
-
#test_site_wlan_twilio_setup(body: nil) ⇒ ApiResponse
Allows validation of twilio setup In case of success, a text message confirming successful setup should be received.
Methods inherited from BaseController
#initialize, #new_parameter, #new_request_builder, #new_response_handler, user_agent
Constructor Details
This class inherits a constructor from MistApi::BaseController
Instance Method Details
#test_site_wlan_twilio_setup(body: nil) ⇒ ApiResponse
Allows validation of twilio setup In case of success, a text message confirming successful setup should be received. In case of error, twilio error code and message are returned.
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/mist_api/controllers/utilities_wi_fi.rb', line 14 def test_site_wlan_twilio_setup(body: nil) @api_call .request(new_request_builder(HttpMethodEnum::POST, '/api/v1/utils/test_twilio', Server::API_HOST) .header_param(new_parameter('application/json', key: 'Content-Type')) .body_param(new_parameter(body)) .body_serializer(proc do |param| param.to_json unless param.nil? end) .auth(Or.new('apiToken', 'basicAuth', And.new('basicAuth', 'csrfToken')))) .response(new_response_handler .is_nullify404(true) .is_response_void(true) .is_api_response(true) .local_error('400', 'Bad Syntax', APIException) .local_error('401', 'Unauthorized', APIException) .local_error('403', 'Permission Denied', APIException) .local_error('404', 'Not found. The API endpoint doesn’t exist or resource doesn’ t'\ ' exist', APIException) .local_error('429', 'Too Many Request. The API Token used for the request reached'\ ' the 5000 API Calls per hour threshold', APIException)) .execute end |