lib/dependency-tracker-client/api/permission_api.rb
def add_permission_to_team_with_http_info(uuid, permission, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: PermissionApi.add_permission_to_team ...'
      end
      # verify the required parameter 'uuid' is set
      if @api_client.config.client_side_validation && uuid.nil?
        fail ArgumentError, "Missing the required parameter 'uuid' when calling PermissionApi.add_permission_to_team"
      end
      # verify the required parameter 'permission' is set
      if @api_client.config.client_side_validation && permission.nil?
        fail ArgumentError, "Missing the required parameter 'permission' when calling PermissionApi.add_permission_to_team"
      end
      # resource path
      local_var_path = '/v1/permission/{permission}/team/{uuid}'.sub('{' + 'uuid' + '}', CGI.escape(uuid.to_s)).sub('{' + 'permission' + '}', CGI.escape(permission.to_s))

      # 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[:body] 

      # return_type
      return_type = opts[:return_type] || 'Team' 

      # auth_names
      auth_names = opts[:auth_names] || ['X-Api-Key']

      new_options = opts.merge(
        :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(:POST, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: PermissionApi#add_permission_to_team\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
# Adds the permission to the specified username.
# Requires &#39;manage users&#39; permission.
# @param uuid [String] A valid team uuid
# @param permission [String] A valid permission
# @param [Hash] opts the optional parameters
# @return [Array<(Team, Integer, Hash)>] Team data, response status code and response headers
Adds the permission to the specified username.
Requires 'manage users' permission.
Adds the permission to the specified username . Requires ' manage users ' permission .
def add_permission_to_team_with_http_info(uuid, permission, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: PermissionApi.add_permission_to_team ...'
      end
      if @api_client.config.client_side_validation && uuid.nil?
        fail ArgumentError, "Missing the required parameter 'uuid' when calling PermissionApi.add_permission_to_team"
      end
      if @api_client.config.client_side_validation && permission.nil?
        fail ArgumentError, "Missing the required parameter 'permission' when calling PermissionApi.add_permission_to_team"
      end
      local_var_path = '/v1/permission/{permission}/team/{uuid}'.sub('{' + 'uuid' + '}', CGI.escape(uuid.to_s)).sub('{' + 'permission' + '}', CGI.escape(permission.to_s))
      query_params = opts[:query_params] || {}
      header_params = opts[:header_params] || {}
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      form_params = opts[:form_params] || {}
      post_body = opts[:body] 
      return_type = opts[:return_type] || 'Team' 
      auth_names = opts[:auth_names] || ['X-Api-Key']
      new_options = opts.merge(
        :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(:POST, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: PermissionApi#add_permission_to_team\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
def add_permission_to_team_with_http_info ( uuid , permission , opts = { } ) if @api_client . config . debugging @api_client . config . logger . debug 'Calling API: PermissionApi.add_permission_to_team ...' end if @api_client . config . client_side_validation && uuid . nil? fail ArgumentError , "Missing the required parameter 'uuid' when calling PermissionApi.add_permission_to_team" end if @api_client . config . client_side_validation && permission . nil? fail ArgumentError , "Missing the required parameter 'permission' when calling PermissionApi.add_permission_to_team" end local_var_path = '/v1/permission/{permission}/team/{uuid}' . sub ( '{' + 'uuid' + '}' , CGI . escape ( uuid . to_s ) ) . sub ( '{' + 'permission' + '}' , CGI . escape ( permission . to_s ) ) query_params = opts [ :query_params ] || { } header_params = opts [ :header_params ] || { } header_params [ 'Accept' ] = @api_client . select_header_accept ( [ 'application/json' ] ) form_params = opts [ :form_params ] || { } post_body = opts [ :body ] return_type = opts [ :return_type ] || 'Team' auth_names = opts [ :auth_names ] || [ 'X-Api-Key' ] new_options = opts . merge ( :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 ( :POST , local_var_path , new_options ) if @api_client . config . debugging @api_client . config . logger . debug "API called: PermissionApi#add_permission_to_team\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data , status_code , headers end
Adds the permission to the specified username.
Adds the permission to the specified username .
# verify the required parameter 'uuid' is set # verify the required parameter 'permission' is set # resource path # query parameters # header parameters # HTTP header 'Accept' (if needed) # form parameters # http body (model) # return_type # auth_names
Team data, response status code and response headers
Team data response status code and response headers
Array<(Team, Integer, Hash)>
uuid
A valid team uuid
A valid team uuid
permission
A valid permission
A valid permission
opts
opts the optional parameters
opts the optional parameters