Method: PureCloud::QualityApi#post_publishedforms_with_http_info

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

#post_publishedforms_with_http_info(body, opts = {}) ⇒ Array<(EvaluationForm, Fixnum, Hash)>

Publish an evaluation form.

Parameters:

  • body

    Evaluation form

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

    the optional parameters

Returns:

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

    EvaluationForm data, response status code and response headers



1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
# File 'lib/purecloud/api/quality_api.rb', line 1796

def (body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: QualityApi#post_publishedforms ..."
  end
  
  # verify the required parameter 'body' is set
  fail "Missing the required parameter 'body' when calling post_publishedforms" if body.nil?
  
  # resource path
  local_var_path = "/api/v2/quality/publishedforms".sub('{format}','json')

  # 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(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,
    :return_type => 'EvaluationForm')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: QualityApi#post_publishedforms\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end