Method: PureCloud::GroupsApi#post_group_id_members_with_http_info

Defined in:
lib/purecloud/api/groups_api.rb

#post_group_id_members_with_http_info(group_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Add members

Parameters:

  • group_id

    Group ID

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

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



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
411
412
413
# File 'lib/purecloud/api/groups_api.rb', line 371

def post_group_id_members_with_http_info(group_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: GroupsApi#post_group_id_members ..."
  end
  
  # verify the required parameter 'group_id' is set
  fail "Missing the required parameter 'group_id' when calling post_group_id_members" if group_id.nil?
  
  # resource path
  local_var_path = "/api/v2/groups/{groupId}/members".sub('{format}','json').sub('{' + 'groupId' + '}', group_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(opts[:'body'])
  
  auth_names = ['PureCloud Auth']
  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)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: GroupsApi#post_group_id_members\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end