Class: EmassClient::MilestonesApi

Inherits:
Object
  • Object
show all
Defined in:
lib/emass_client/api/milestones_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ MilestonesApi

Returns a new instance of MilestonesApi.



19
20
21
# File 'lib/emass_client/api/milestones_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/emass_client/api/milestones_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#add_milestone_by_system_id_and_poam_id(system_id, poam_id, request_body, opts = {}) ⇒ MilestoneResponsePost

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`

Parameters:

  • system_id (Integer)

    **System Id**: The unique system record identifier.

  • poam_id (Integer)

    **POA&M Id**: The unique POA&M record identifier.

  • request_body (Array<Object>)

    Add milestones to an existing system poam

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



29
30
31
32
# File 'lib/emass_client/api/milestones_api.rb', line 29

def add_milestone_by_system_id_and_poam_id(system_id, poam_id, request_body, opts = {})
  data, _status_code, _headers = add_milestone_by_system_id_and_poam_id_with_http_info(system_id, poam_id, request_body, opts)
  data
end

#add_milestone_by_system_id_and_poam_id_with_http_info(system_id, poam_id, request_body, opts = {}) ⇒ Array<(MilestoneResponsePost, Integer, Hash)>

Add milestones to one or many POA&amp;M items in a system Adds a milestone for given &#x60;systemId&#x60; and &#x60;poamId&#x60; path parameters **Request Body Required Fields** - &#x60;description&#x60; - &#x60;scheduledCompletionDate&#x60;

Parameters:

  • system_id (Integer)

    **System Id**: The unique system record identifier.

  • poam_id (Integer)

    **POA&amp;M Id**: The unique POA&amp;M record identifier.

  • request_body (Array<Object>)

    Add milestones to an existing system poam

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(MilestoneResponsePost, Integer, Hash)>)

    MilestoneResponsePost data, response status code and response headers



41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# File 'lib/emass_client/api/milestones_api.rb', line 41

def add_milestone_by_system_id_and_poam_id_with_http_info(system_id, poam_id, request_body, 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 '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
  # verify the required parameter 'request_body' is set
  if @api_client.config.client_side_validation && request_body.nil?
    fail ArgumentError, "Missing the required parameter 'request_body' 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' + '}', CGI.escape(system_id.to_s)).sub('{' + 'poamId' + '}', CGI.escape(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'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body)

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

  # auth_names
  auth_names = opts[:debug_auth_names] || ['apiKey', 'mockType', 'userId']

  new_options = opts.merge(
    :operation => :"MilestonesApi.add_milestone_by_system_id_and_poam_id",
    :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: 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

#delete_milestone(system_id, poam_id, milestones_request_delete_body_inner, opts = {}) ⇒ MilestonesPutPostDelete

Remove milestones in a system for one or many POA&M items Remove the POA&M matching ‘systemId` and `poamId` for path parameters and `milstoneId` provide in the Requst Body Notes
To delete a milestone the record must be inactive by having the field isActive set to false (`isActive=false`).

Parameters:

  • system_id (Integer)

    **System Id**: The unique system record identifier.

  • poam_id (Integer)

    **POA&amp;M Id**: The unique POA&amp;M record identifier.

  • milestones_request_delete_body_inner (Array<MilestonesRequestDeleteBodyInner>)

    Delete the given Milestone Id

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



109
110
111
112
# File 'lib/emass_client/api/milestones_api.rb', line 109

def delete_milestone(system_id, poam_id, milestones_request_delete_body_inner, opts = {})
  data, _status_code, _headers = delete_milestone_with_http_info(system_id, poam_id, milestones_request_delete_body_inner, opts)
  data
end

#delete_milestone_with_http_info(system_id, poam_id, milestones_request_delete_body_inner, opts = {}) ⇒ Array<(MilestonesPutPostDelete, Integer, Hash)>

Remove milestones in a system for one or many POA&amp;M items Remove the POA&amp;M matching &#x60;systemId&#x60; and &#x60;poamId&#x60; for path parameters and &#x60;milstoneId&#x60; provide in the Requst Body Notes&lt;br&gt; To delete a milestone the record must be inactive by having the field isActive set to false (&#x60;isActive&#x3D;false&#x60;).

Parameters:

  • system_id (Integer)

    **System Id**: The unique system record identifier.

  • poam_id (Integer)

    **POA&amp;M Id**: The unique POA&amp;M record identifier.

  • milestones_request_delete_body_inner (Array<MilestonesRequestDeleteBodyInner>)

    Delete the given Milestone Id

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(MilestonesPutPostDelete, Integer, Hash)>)

    MilestonesPutPostDelete data, response status code and response headers



121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
# File 'lib/emass_client/api/milestones_api.rb', line 121

def delete_milestone_with_http_info(system_id, poam_id, milestones_request_delete_body_inner, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: 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
  # verify the required parameter 'milestones_request_delete_body_inner' is set
  if @api_client.config.client_side_validation && milestones_request_delete_body_inner.nil?
    fail ArgumentError, "Missing the required parameter 'milestones_request_delete_body_inner' when calling MilestonesApi.delete_milestone"
  end
  # resource path
  local_var_path = '/api/systems/{systemId}/poams/{poamId}/milestones'.sub('{' + 'systemId' + '}', CGI.escape(system_id.to_s)).sub('{' + 'poamId' + '}', CGI.escape(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'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(milestones_request_delete_body_inner)

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

  # auth_names
  auth_names = opts[:debug_auth_names] || ['apiKey', 'mockType', 'userId']

  new_options = opts.merge(
    :operation => :"MilestonesApi.delete_milestone",
    :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: MilestonesApi#delete_milestone\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_system_milestones_by_poam_id(system_id, poam_id, opts = {}) ⇒ MilestoneResponseGet

Get milestones in one or many POA&M items in a system Returns system containing milestones for matching parameters.

Parameters:

  • system_id (Integer)

    **System Id**: The unique system record identifier.

  • poam_id (Integer)

    **POA&amp;M Id**: The unique POA&amp;M record identifier.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :scheduled_completion_date_start (String)

    **Date Started**: Filter query by the scheduled completion start date (Unix date format).

  • :scheduled_completion_date_end (String)

    **Date Ended**: Filter query by the scheduled completion start date (Unix date format).

Returns:



190
191
192
193
# File 'lib/emass_client/api/milestones_api.rb', line 190

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_system_milestones_by_poam_id_and_milestone_id(system_id, poam_id, milestone_id, opts = {}) ⇒ MilestoneResponseGetMilestone

Get milestone by ID in POA&M item in a system Returns systems containing milestones for matching parameters.

Parameters:

  • system_id (Integer)

    **System Id**: The unique system record identifier.

  • poam_id (Integer)

    **POA&amp;M Id**: The unique POA&amp;M record identifier.

  • milestone_id (Integer)

    **Milestone Id**: The unique milestone record identifier.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



264
265
266
267
# File 'lib/emass_client/api/milestones_api.rb', line 264

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_system_milestones_by_poam_id_and_milestone_id_with_http_info(system_id, poam_id, milestone_id, opts = {}) ⇒ Array<(MilestoneResponseGetMilestone, Integer, Hash)>

Get milestone by ID in POA&amp;M item in a system Returns systems containing milestones for matching parameters.

Parameters:

  • system_id (Integer)

    **System Id**: The unique system record identifier.

  • poam_id (Integer)

    **POA&amp;M Id**: The unique POA&amp;M record identifier.

  • milestone_id (Integer)

    **Milestone Id**: The unique milestone record identifier.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
# File 'lib/emass_client/api/milestones_api.rb', line 276

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' + '}', CGI.escape(system_id.to_s)).sub('{' + 'poamId' + '}', CGI.escape(poam_id.to_s)).sub('{' + 'milestoneId' + '}', CGI.escape(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[:debug_body]

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

  # auth_names
  auth_names = opts[:debug_auth_names] || ['apiKey', 'mockType', 'userId']

  new_options = opts.merge(
    :operation => :"MilestonesApi.get_system_milestones_by_poam_id_and_milestone_id",
    :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: 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_system_milestones_by_poam_id_with_http_info(system_id, poam_id, opts = {}) ⇒ Array<(MilestoneResponseGet, Integer, Hash)>

Get milestones in one or many POA&amp;M items in a system Returns system containing milestones for matching parameters.

Parameters:

  • system_id (Integer)

    **System Id**: The unique system record identifier.

  • poam_id (Integer)

    **POA&amp;M Id**: The unique POA&amp;M record identifier.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :scheduled_completion_date_start (String)

    **Date Started**: Filter query by the scheduled completion start date (Unix date format).

  • :scheduled_completion_date_end (String)

    **Date Ended**: Filter query by the scheduled completion start date (Unix date format).

Returns:

  • (Array<(MilestoneResponseGet, Integer, Hash)>)

    MilestoneResponseGet data, response status code and response headers



203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
# File 'lib/emass_client/api/milestones_api.rb', line 203

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' + '}', CGI.escape(system_id.to_s)).sub('{' + 'poamId' + '}', CGI.escape(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[:debug_body]

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

  # auth_names
  auth_names = opts[:debug_auth_names] || ['apiKey', 'mockType', 'userId']

  new_options = opts.merge(
    :operation => :"MilestonesApi.get_system_milestones_by_poam_id",
    :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: MilestonesApi#get_system_milestones_by_poam_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_milestone_by_system_id_and_poam_id(system_id, poam_id, request_body, opts = {}) ⇒ MilestoneResponsePut

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`

Parameters:

  • system_id (Integer)

    **System Id**: The unique system record identifier.

  • poam_id (Integer)

    **POA&amp;M Id**: The unique POA&amp;M record identifier.

  • request_body (Array<Object>)

    Update milestones for an existing system poam

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



339
340
341
342
# File 'lib/emass_client/api/milestones_api.rb', line 339

def update_milestone_by_system_id_and_poam_id(system_id, poam_id, request_body, opts = {})
  data, _status_code, _headers = update_milestone_by_system_id_and_poam_id_with_http_info(system_id, poam_id, request_body, opts)
  data
end

#update_milestone_by_system_id_and_poam_id_with_http_info(system_id, poam_id, request_body, opts = {}) ⇒ Array<(MilestoneResponsePut, Integer, Hash)>

Update one or many POA&amp;M items in a system Updates a milestone for given &#x60;systemId&#x60; and &#x60;poamId&#x60; path parameters **Request Body Required Fields** - &#x60;milestoneId&#x60; - &#x60;description&#x60; - &#x60;scheduledCompletionDate&#x60;

Parameters:

  • system_id (Integer)

    **System Id**: The unique system record identifier.

  • poam_id (Integer)

    **POA&amp;M Id**: The unique POA&amp;M record identifier.

  • request_body (Array<Object>)

    Update milestones for an existing system poam

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(MilestoneResponsePut, Integer, Hash)>)

    MilestoneResponsePut data, response status code and response headers



351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
# File 'lib/emass_client/api/milestones_api.rb', line 351

def update_milestone_by_system_id_and_poam_id_with_http_info(system_id, poam_id, request_body, 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 '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
  # verify the required parameter 'request_body' is set
  if @api_client.config.client_side_validation && request_body.nil?
    fail ArgumentError, "Missing the required parameter 'request_body' 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' + '}', CGI.escape(system_id.to_s)).sub('{' + 'poamId' + '}', CGI.escape(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'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body)

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

  # auth_names
  auth_names = opts[:debug_auth_names] || ['apiKey', 'mockType', 'userId']

  new_options = opts.merge(
    :operation => :"MilestonesApi.update_milestone_by_system_id_and_poam_id",
    :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(:PUT, local_var_path, new_options)
  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