def cancel_scheduled_message(message_id,
                                 body)
      # Prepare query url.
      _path_url = '/v1/messages/{messageId}'
      _path_url = APIHelper.append_url_with_template_parameters(
        _path_url,
        'messageId' => message_id
      )
      _query_builder = Configuration.base_uri.dup
      _query_builder << _path_url
      _query_url = APIHelper.clean_url _query_builder

      # Prepare headers.
      _headers = {
        'accept' => 'application/json',
        'content-type' => 'application/json; charset=utf-8'
      }

      # Prepare and execute HttpRequest.
      _request = @http_client.put(
        _query_url,
        headers: _headers,
        parameters: body.to_json
      )
      AuthManager.apply(_request, _path_url, body.to_json)
      _context = execute_request(_request)
      validate_response(_context)

      # Return appropriate response type.
      decoded = APIHelper.json_deserialize(_context.response.raw_body) unless
        _context.response.raw_body.nil? ||
        _context.response.raw_body.to_s.strip.empty?
      decoded
    end
def cancel_scheduled_message(message_id,
                                 body)
      # Prepare query url.
      _path_url = '/v1/messages/{messageId}'
      _path_url = APIHelper.append_url_with_template_parameters(
        _path_url,
        'messageId' => message_id
      )
      _query_builder = Configuration.base_uri.dup
      _query_builder << _path_url
      _query_url = APIHelper.clean_url _query_builder

      # Prepare headers.
      _headers = {
        'accept' => 'application/json',
        'content-type' => 'application/json; charset=utf-8'
      }

      # Prepare and execute HttpRequest.
      _request = @http_client.put(
        _query_url,
        headers: _headers,
        parameters: body.to_json
      )
      AuthManager.apply(_request, _path_url, body.to_json)
      _context = execute_request(_request)
      validate_response(_context)

      # Return appropriate response type.
      decoded = APIHelper.json_deserialize(_context.response.raw_body) unless
        _context.response.raw_body.nil? ||
        _context.response.raw_body.to_s.strip.empty?
      decoded
    end
Cancel a scheduled message that has not yet been delivered.
 A scheduled message can be cancelled by updating the status of a message
 from ```scheduled```
 to ```cancelled```. This is done by submitting a PUT request to the
 messages endpoint using
 the message ID as a parameter (the same endpoint used above to retrieve
 the status of a message).
 The body of the request simply needs to contain a ```status``` property
 with the value set
 to ```cancelled```.
 ```json
 {
     "status": "cancelled"
 }
 ```
 *Note: Only messages with a status of scheduled can be cancelled. If an
 invalid or non existent
 message ID parameter is specified in the request, then a HTTP 404 Not
 Found response will be
 returned*
 @param [String] message_id Required parameter: Example:
 @param [CancelScheduledMessageRequest] body Required parameter: Example:
 @return Mixed response from the API call