class EmassClient::MilestonesApi
Attributes
Public Class Methods
# File lib/emass_client/api/milestones_api.rb, line 16 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
Add milestones to one or many POA&M items in a system Adds a milestone for given ‘systemId` and `poamId` path parameters **Request Body Required Fields** - `description` - `scheduledCompletionDate` @param body Update an existing milestone @param system_id **System Id**: The unique system record identifier. @param poam_id **POA&M Id**: The unique POA&M record identifier. @param [Hash] opts the optional parameters @return [MilestoneResponsePost]
# File lib/emass_client/api/milestones_api.rb, line 26 def add_milestone_by_system_id_and_poam_id(body, system_id, poam_id, opts = {}) data, _status_code, _headers = add_milestone_by_system_id_and_poam_id_with_http_info(body, system_id, poam_id, opts) data end
Add milestones to one or many POA&M items in a system Adds a milestone for given `systemId` and `poamId` path parameters **Request Body Required Fields** - `description` - `scheduledCompletionDate` @param body Update an existing milestone @param system_id **System Id**: The unique system record identifier. @param poam_id **POA&M Id**: The unique POA&M record identifier. @param [Hash] opts the optional parameters @return [Array<(MilestoneResponsePost
, Integer, Hash)>] MilestoneResponsePost
data, response status code and response headers
# File lib/emass_client/api/milestones_api.rb, line 38 def add_milestone_by_system_id_and_poam_id_with_http_info(body, system_id, poam_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MilestonesApi.add_milestone_by_system_id_and_poam_id ...' end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling MilestonesApi.add_milestone_by_system_id_and_poam_id" end # verify the required parameter 'system_id' is set if @api_client.config.client_side_validation && system_id.nil? fail ArgumentError, "Missing the required parameter 'system_id' when calling MilestonesApi.add_milestone_by_system_id_and_poam_id" end # verify the required parameter 'poam_id' is set if @api_client.config.client_side_validation && poam_id.nil? fail ArgumentError, "Missing the required parameter 'poam_id' when calling MilestonesApi.add_milestone_by_system_id_and_poam_id" end # resource path local_var_path = '/api/systems/{systemId}/poams/{poamId}/milestones'.sub('{' + 'systemId' + '}', system_id.to_s).sub('{' + 'poamId' + '}', poam_id.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']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) return_type = opts[:return_type] || 'MilestoneResponsePost' auth_names = opts[:auth_names] || ['apikey', 'mockType', 'userid'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: MilestonesApi#add_milestone_by_system_id_and_poam_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Remove milestones in a system for one or many POA&M items Remove the POA&M matching ‘systemId` path parameter
Notes
To delete a milestone the record must be inactive by having the field isActive set to false (`isActive=false`). @param body Delete the given Milestone Id @param system_id **System Id**: The unique system record identifier. @param poam_id **POA&M Id**: The unique POA&M record identifier. @param [Hash] opts the optional parameters @return [Empty200Response]
# File lib/emass_client/api/milestones_api.rb, line 96 def delete_milestone(body, system_id, poam_id, opts = {}) data, _status_code, _headers = delete_milestone_with_http_info(body, system_id, poam_id, opts) data end
Remove milestones in a system for one or many POA&M items Remove the POA&M matching `systemId` path parameter<br> Notes<br> To delete a milestone the record must be inactive by having the field isActive set to false (`isActive=false`). @param body Delete the given Milestone Id @param system_id **System Id**: The unique system record identifier. @param poam_id **POA&M Id**: The unique POA&M record identifier. @param [Hash] opts the optional parameters @return [Array<(Empty200Response
, Integer, Hash)>] Empty200Response
data, response status code and response headers
# File lib/emass_client/api/milestones_api.rb, line 108 def delete_milestone_with_http_info(body, system_id, poam_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MilestonesApi.delete_milestone ...' end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling MilestonesApi.delete_milestone" end # verify the required parameter 'system_id' is set if @api_client.config.client_side_validation && system_id.nil? fail ArgumentError, "Missing the required parameter 'system_id' when calling MilestonesApi.delete_milestone" end # verify the required parameter 'poam_id' is set if @api_client.config.client_side_validation && poam_id.nil? fail ArgumentError, "Missing the required parameter 'poam_id' when calling MilestonesApi.delete_milestone" end # resource path local_var_path = '/api/systems/{systemId}/poams/{poamId}/milestones'.sub('{' + 'systemId' + '}', system_id.to_s).sub('{' + 'poamId' + '}', poam_id.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']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) return_type = opts[:return_type] || 'Empty200Response' auth_names = opts[:auth_names] || ['apikey', 'mockType', 'userid'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: MilestonesApi#delete_milestone\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get milestones in one or many POA&M items in a system Returns system containing milestones for matching parameters. @param system_id **System Id**: The unique system record identifier. @param poam_id **POA&M Id**: The unique POA&M record identifier. @param [Hash] opts the optional parameters @option opts [String] :scheduled_completion_date_start **Date Started**: Filter query by the scheduled completion start date (Unix date format). @option opts [String] :scheduled_completion_date_end **Date Ended**: Filter query by the scheduled completion start date (Unix date format). @return [MilestoneResponseGet]
# File lib/emass_client/api/milestones_api.rb, line 167 def get_system_milestones_by_poam_id(system_id, poam_id, opts = {}) data, _status_code, _headers = get_system_milestones_by_poam_id_with_http_info(system_id, poam_id, opts) data end
Get milestone by ID in POA&M item in a system Returns systems containing milestones for matching parameters. @param system_id **System Id**: The unique system record identifier. @param poam_id **POA&M Id**: The unique POA&M record identifier. @param milestone_id **Milestone Id**: The unique milestone record identifier. @param [Hash] opts the optional parameters @return [MilestoneResponseGet]
# File lib/emass_client/api/milestones_api.rb, line 234 def get_system_milestones_by_poam_id_and_milestone_id(system_id, poam_id, milestone_id, opts = {}) data, _status_code, _headers = get_system_milestones_by_poam_id_and_milestone_id_with_http_info(system_id, poam_id, milestone_id, opts) data end
Get milestone by ID in POA&M item in a system Returns systems containing milestones for matching parameters. @param system_id **System Id**: The unique system record identifier. @param poam_id **POA&M Id**: The unique POA&M record identifier. @param milestone_id **Milestone Id**: The unique milestone record identifier. @param [Hash] opts the optional parameters @return [Array<(MilestoneResponseGet
, Integer, Hash)>] MilestoneResponseGet
data, response status code and response headers
# File lib/emass_client/api/milestones_api.rb, line 246 def get_system_milestones_by_poam_id_and_milestone_id_with_http_info(system_id, poam_id, milestone_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MilestonesApi.get_system_milestones_by_poam_id_and_milestone_id ...' end # verify the required parameter 'system_id' is set if @api_client.config.client_side_validation && system_id.nil? fail ArgumentError, "Missing the required parameter 'system_id' when calling MilestonesApi.get_system_milestones_by_poam_id_and_milestone_id" end # verify the required parameter 'poam_id' is set if @api_client.config.client_side_validation && poam_id.nil? fail ArgumentError, "Missing the required parameter 'poam_id' when calling MilestonesApi.get_system_milestones_by_poam_id_and_milestone_id" end # verify the required parameter 'milestone_id' is set if @api_client.config.client_side_validation && milestone_id.nil? fail ArgumentError, "Missing the required parameter 'milestone_id' when calling MilestonesApi.get_system_milestones_by_poam_id_and_milestone_id" end # resource path local_var_path = '/api/systems/{systemId}/poams/{poamId}/milestones/{milestoneId}'.sub('{' + 'systemId' + '}', system_id.to_s).sub('{' + 'poamId' + '}', poam_id.to_s).sub('{' + 'milestoneId' + '}', milestone_id.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 = opts[:return_type] || 'MilestoneResponseGet' auth_names = opts[:auth_names] || ['apikey', 'mockType', 'userid'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: MilestonesApi#get_system_milestones_by_poam_id_and_milestone_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get milestones in one or many POA&M items in a system Returns system containing milestones for matching parameters. @param system_id **System Id**: The unique system record identifier. @param poam_id **POA&M Id**: The unique POA&M record identifier. @param [Hash] opts the optional parameters @option opts [String] :scheduled_completion_date_start **Date Started**: Filter query by the scheduled completion start date (Unix date format). @option opts [String] :scheduled_completion_date_end **Date Ended**: Filter query by the scheduled completion start date (Unix date format). @return [Array<(MilestoneResponseGet
, Integer, Hash)>] MilestoneResponseGet
data, response status code and response headers
# File lib/emass_client/api/milestones_api.rb, line 180 def get_system_milestones_by_poam_id_with_http_info(system_id, poam_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MilestonesApi.get_system_milestones_by_poam_id ...' end # verify the required parameter 'system_id' is set if @api_client.config.client_side_validation && system_id.nil? fail ArgumentError, "Missing the required parameter 'system_id' when calling MilestonesApi.get_system_milestones_by_poam_id" end # verify the required parameter 'poam_id' is set if @api_client.config.client_side_validation && poam_id.nil? fail ArgumentError, "Missing the required parameter 'poam_id' when calling MilestonesApi.get_system_milestones_by_poam_id" end # resource path local_var_path = '/api/systems/{systemId}/poams/{poamId}/milestones'.sub('{' + 'systemId' + '}', system_id.to_s).sub('{' + 'poamId' + '}', poam_id.to_s) # query parameters query_params = opts[:query_params] || {} query_params[:'scheduledCompletionDateStart'] = opts[:'scheduled_completion_date_start'] if !opts[:'scheduled_completion_date_start'].nil? query_params[:'scheduledCompletionDateEnd'] = opts[:'scheduled_completion_date_end'] if !opts[:'scheduled_completion_date_end'].nil? # 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 = opts[:return_type] || 'MilestoneResponseGet' auth_names = opts[:auth_names] || ['apikey', 'mockType', 'userid'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: MilestonesApi#get_system_milestones_by_poam_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Update one or many POA&M items in a system Updates a milestone for given ‘systemId` and `poamId` path parameters **Request Body Required Fields** - `milestoneId` - `description` - `scheduledCompletionDate` @param body Update an existing control by Id @param system_id **System Id**: The unique system record identifier. @param poam_id **POA&M Id**: The unique POA&M record identifier. @param [Hash] opts the optional parameters @return [MilestoneResponsePut]
# File lib/emass_client/api/milestones_api.rb, line 302 def update_milestone_by_system_id_and_poam_id(body, system_id, poam_id, opts = {}) data, _status_code, _headers = update_milestone_by_system_id_and_poam_id_with_http_info(body, system_id, poam_id, opts) data end
Update one or many POA&M items in a system Updates a milestone for given `systemId` and `poamId` path parameters **Request Body Required Fields** - `milestoneId` - `description` - `scheduledCompletionDate` @param body Update an existing control by Id @param system_id **System Id**: The unique system record identifier. @param poam_id **POA&M Id**: The unique POA&M record identifier. @param [Hash] opts the optional parameters @return [Array<(MilestoneResponsePut
, Integer, Hash)>] MilestoneResponsePut
data, response status code and response headers
# File lib/emass_client/api/milestones_api.rb, line 314 def update_milestone_by_system_id_and_poam_id_with_http_info(body, system_id, poam_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MilestonesApi.update_milestone_by_system_id_and_poam_id ...' end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling MilestonesApi.update_milestone_by_system_id_and_poam_id" end # verify the required parameter 'system_id' is set if @api_client.config.client_side_validation && system_id.nil? fail ArgumentError, "Missing the required parameter 'system_id' when calling MilestonesApi.update_milestone_by_system_id_and_poam_id" end # verify the required parameter 'poam_id' is set if @api_client.config.client_side_validation && poam_id.nil? fail ArgumentError, "Missing the required parameter 'poam_id' when calling MilestonesApi.update_milestone_by_system_id_and_poam_id" end # resource path local_var_path = '/api/systems/{systemId}/poams/{poamId}/milestones'.sub('{' + 'systemId' + '}', system_id.to_s).sub('{' + 'poamId' + '}', poam_id.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']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) return_type = opts[:return_type] || 'MilestoneResponsePut' auth_names = opts[:auth_names] || ['apikey', 'mockType', 'userid'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: MilestonesApi#update_milestone_by_system_id_and_poam_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end