able a user. Can only be used with an application key belonging
    # to an administrator user.
    # @param user_id [String] The ID of the user.
    # @param opts [Hash] the optional parameters
    # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
    def disable_user_with_http_info(user_id, opts = {})

      if @api_client.config.unstable_operations.has_key?(:disable_user)
        unstable_enabled = @api_client.config.unstable_operations[:disable_user]
        if unstable_enabled
          @api_client.config.logger.warn format("Using unstable operation '%s'", "disable_user")
        else
          raise APIError.new(message: format("Unstable operation '%s' is disabled", "disable_user"))
        end
      end

      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: UsersAPI.disable_user...'
      end
      # verify the required parameter 'user_id' is set
      if @api_client.config.client_side_validation && user_id.nil?
        fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersAPI.disable_user"
      end
      # resource path
      local_var_path = '/api/v2/users/{user_id}'.sub('{user_id}', CGI.escape(user_id.to_s).gsub('%2F', '/'))

      # query parameters
      query_params = opts[:query_params] || {}

      # header parameters
      header_params = opts[:header_params] || {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['*/*'])

      # form parameters
      form_params = opts[:form_params] || {}

      # http body (model)
      post_body = opts[:debug_body]

      # return_type
      return_type = opts[:debug_return_type]

      # auth_names
      auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]

      new_options = opts.merge(
        :operation => :disable_user,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )

      data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: UsersAPI#disable_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Get a user invitation
    # Returns a single user invitation by its UUID.
    # @param user_invitation_uuid [String] The UUID of the user invitation.
    # @param opts [Hash] the optional parameters
    # @return [UserInvitationResponse]
    def get_invitation(user_invitation_uuid, opts = {})
      data, _status_code, _headers = get_invitation_with_http_info(user_invitation_uuid, opts)
      data
    end

    # Get a user invitation
    # Returns a single user invitation by its UUID.
    # @param user_invitation_uuid [String] The UUID of the user invitation.
    # @param opts [Hash] the optional parameters
    # @return [Array<(UserInvitationResponse, Integer, Hash)>] UserInvitationResponse data, response status code and response headers
    def get_invitation_with_http_info(user_invitation_uuid, opts = {})

      if @api_client.config.unstable_operations.has_key?(:get_invitation)
        unstable_enabled = @api_client.config.unstable_operations[:get_invitation]
        if unstable_enabled
          @api_client.config.logger.warn format("Using unstable operation '%s'", "get_invitation")
        else
          raise APIError.new(message: format("Unstable operation '%s' is disabled", "get_invitation"))
        end
      end

      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: UsersAPI.get_invitation...'
      end
      # verify the required parameter 'user_invitation_uuid' is set
      if @api_client.config.client_side_validation && user_invitation_uuid.nil?
        fail ArgumentError, "Missing the required parameter 'user_invitation_uuid' when calling UsersAPI.get_invitation"
      end
      # resource path
      local_var_path = '/api/v2/user_invitations/{user_invitation_uuid}'.sub('{user_invitation_uuid}', CGI.escape(user_invitation_uuid.to_s).gsub('%2F', '/'))

      # query parameters
      query_params = opts[:query_params] || {}

      # header parameters
      header_params = opts[:header_params] || {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])

      # form parameters
      form_params = opts[:form_params] || {}

      # http body (model)
      post_body = opts[:debug_body]

      # return_type
      return_type = opts[:debug_return_type] || 'UserInvitationResponse'

      # auth_names
      auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]

      new_options = opts.merge(
        :operation => :get_invitation,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )

      data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: UsersAPI#get_invitation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Get user details
    # Get a user in the organization specified by the user’s `user_id`.
    # @param user_id [String] The ID of the user.
    # @param opts [Hash] the optional parameters
    # @return [UserResponse]
    def get_user(user_id, opts = {})
      data, _status_code, _headers = get_user_with_http_info(user_id, opts)
      data
    end

    # Get user details
    # Get a user in the organization specified by the user’s `user_id`.
    # @param user_id [String] The ID of the user.
    # @param opts [Hash] the optional parameters
    # @return [Array<(UserResponse, Integer, Hash)>] UserResponse data, response status code and response headers
    def get_user_with_http_info(user_id, opts = {})

      if @api_client.config.unstable_operations.has_key?(:get_user)
        unstable_enabled = @api_client.config.unstable_operations[:get_user]
        if unstable_enabled
          @api_client.config.logger.warn format("Using unstable operation '%s'", "get_user")
        else
          raise APIError.new(message: format("Unstable operation '%s' is disabled", "get_user"))
        end
      end

      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: UsersAPI.get_user...'
      end
      # verify the required parameter 'user_id' is set
      if @api_client.config.client_side_validation && user_id.nil?
        fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersAPI.