Class: PureCloud::ScriptsApi

Inherits:
Object
  • Object
show all
Defined in:
lib/purecloud/api/scripts_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ ScriptsApi

Returns a new instance of ScriptsApi.



7
8
9
# File 'lib/purecloud/api/scripts_api.rb', line 7

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

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



5
6
7
# File 'lib/purecloud/api/scripts_api.rb', line 5

def api_client
  @api_client
end

Instance Method Details

#delete_forms_form_id(form_id, opts = {}) ⇒ String

Delete an evaluation form.

Parameters:

  • form_id

    Form ID

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

    the optional parameters

Returns:

  • (String)


278
279
280
281
# File 'lib/purecloud/api/scripts_api.rb', line 278

def delete_forms_form_id(form_id, opts = {})
  data, status_code, headers = delete_forms_form_id_with_http_info(form_id, opts)
  return data
end

#delete_forms_form_id_with_http_info(form_id, opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Delete an evaluation form.

Parameters:

  • form_id

    Form ID

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

    the optional parameters

Returns:

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

    String data, response status code and response headers



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
331
332
# File 'lib/purecloud/api/scripts_api.rb', line 288

def delete_forms_form_id_with_http_info(form_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ScriptsApi#delete_forms_form_id ..."
  end
  
  # verify the required parameter 'form_id' is set
  fail "Missing the required parameter 'form_id' when calling delete_forms_form_id" if form_id.nil?
  
  # resource path
  path = "/api/v2/quality/forms/{formId}".sub('{format}','json').sub('{' + 'formId' + '}', form_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 = nil
  

  auth_names = ['PureCloud Auth']
  data, status_code, headers = @api_client.call_api(:DELETE, path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ScriptsApi#delete_forms_form_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_forms(opts = {}) ⇒ EvaluationFormEntityListing

Get the list of evaluation forms

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The total page size requested

  • :page_number (Integer)

    The page number requested

  • :sort_by (String)

    variable name requested to sort by

  • :expand (Array<String>)

    variable name requested by expand list

  • :next_page (String)

    next page token

  • :previous_page (String)

    Previous page token

  • :expand2 (String)

    Expand

  • :name (String)

    Name

Returns:



23
24
25
26
# File 'lib/purecloud/api/scripts_api.rb', line 23

def get_forms(opts = {})
  data, status_code, headers = get_forms_with_http_info(opts)
  return data
end

#get_forms_form_id(form_id, opts = {}) ⇒ EvaluationForm

Get an evaluation form

Parameters:

  • form_id

    Form ID

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

    the optional parameters

Returns:



154
155
156
157
# File 'lib/purecloud/api/scripts_api.rb', line 154

def get_forms_form_id(form_id, opts = {})
  data, status_code, headers = get_forms_form_id_with_http_info(form_id, opts)
  return data
end

#get_forms_form_id_versions(form_id, opts = {}) ⇒ EvaluationFormEntityListing

Gets all the revisions for a specific evaluation.

Parameters:

  • form_id

    Form ID

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    Page size

  • :page_number (Integer)

    Page number

Returns:



341
342
343
344
# File 'lib/purecloud/api/scripts_api.rb', line 341

def get_forms_form_id_versions(form_id, opts = {})
  data, status_code, headers = get_forms_form_id_versions_with_http_info(form_id, opts)
  return data
end

#get_forms_form_id_versions_with_http_info(form_id, opts = {}) ⇒ Array<(EvaluationFormEntityListing, Fixnum, Hash)>

Gets all the revisions for a specific evaluation.

Parameters:

  • form_id

    Form ID

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    Page size

  • :page_number (Integer)

    Page number

Returns:



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
# File 'lib/purecloud/api/scripts_api.rb', line 353

def get_forms_form_id_versions_with_http_info(form_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ScriptsApi#get_forms_form_id_versions ..."
  end
  
  # verify the required parameter 'form_id' is set
  fail "Missing the required parameter 'form_id' when calling get_forms_form_id_versions" if form_id.nil?
  
  # resource path
  path = "/api/v2/quality/forms/{formId}/versions".sub('{format}','json').sub('{' + 'formId' + '}', form_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size']
  query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number']

  # 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 = nil
  

  auth_names = ['PureCloud Auth']
  data, status_code, headers = @api_client.call_api(:GET, path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'EvaluationFormEntityListing')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ScriptsApi#get_forms_form_id_versions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_forms_form_id_with_http_info(form_id, opts = {}) ⇒ Array<(EvaluationForm, Fixnum, Hash)>

Get an evaluation form

Parameters:

  • form_id

    Form ID

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

    the optional parameters

Returns:

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

    EvaluationForm data, response status code and response headers



164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
# File 'lib/purecloud/api/scripts_api.rb', line 164

def get_forms_form_id_with_http_info(form_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ScriptsApi#get_forms_form_id ..."
  end
  
  # verify the required parameter 'form_id' is set
  fail "Missing the required parameter 'form_id' when calling get_forms_form_id" if form_id.nil?
  
  # resource path
  path = "/api/v2/quality/forms/{formId}".sub('{format}','json').sub('{' + 'formId' + '}', form_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 = nil
  

  auth_names = ['PureCloud Auth']
  data, status_code, headers = @api_client.call_api(:GET, 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: ScriptsApi#get_forms_form_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_forms_with_http_info(opts = {}) ⇒ Array<(EvaluationFormEntityListing, Fixnum, Hash)>

Get the list of evaluation forms

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The total page size requested

  • :page_number (Integer)

    The page number requested

  • :sort_by (String)

    variable name requested to sort by

  • :expand (Array<String>)

    variable name requested by expand list

  • :next_page (String)

    next page token

  • :previous_page (String)

    Previous page token

  • :expand2 (String)

    Expand

  • :name (String)

    Name

Returns:



40
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
# File 'lib/purecloud/api/scripts_api.rb', line 40

def get_forms_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ScriptsApi#get_forms ..."
  end
  
  # resource path
  path = "/api/v2/quality/forms".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size']
  query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number']
  query_params[:'sortBy'] = opts[:'sort_by'] if opts[:'sort_by']
  query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand']
  query_params[:'nextPage'] = opts[:'next_page'] if opts[:'next_page']
  query_params[:'previousPage'] = opts[:'previous_page'] if opts[:'previous_page']
  query_params[:'expand'] = opts[:'expand2'] if opts[:'expand2']
  query_params[:'name'] = opts[:'name'] if opts[:'name']

  # 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 = nil
  

  auth_names = ['PureCloud Auth']
  data, status_code, headers = @api_client.call_api(:GET, path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'EvaluationFormEntityListing')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ScriptsApi#get_forms\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_publishedforms(opts = {}) ⇒ EvaluationFormEntityListing

Get the published evaluation forms.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    Page size

  • :page_number (Integer)

    Page number

  • :name (String)

    Name

Returns:



408
409
410
411
# File 'lib/purecloud/api/scripts_api.rb', line 408

def get_publishedforms(opts = {})
  data, status_code, headers = get_publishedforms_with_http_info(opts)
  return data
end

#get_publishedforms_form_id(form_id, opts = {}) ⇒ EvaluationForm

Get the published evaluation forms.

Parameters:

  • form_id

    Form ID

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

    the optional parameters

Returns:



529
530
531
532
# File 'lib/purecloud/api/scripts_api.rb', line 529

def get_publishedforms_form_id(form_id, opts = {})
  data, status_code, headers = get_publishedforms_form_id_with_http_info(form_id, opts)
  return data
end

#get_publishedforms_form_id_with_http_info(form_id, opts = {}) ⇒ Array<(EvaluationForm, Fixnum, Hash)>

Get the published evaluation forms.

Parameters:

  • form_id

    Form ID

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

    the optional parameters

Returns:

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

    EvaluationForm data, response status code and response headers



539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
# File 'lib/purecloud/api/scripts_api.rb', line 539

def get_publishedforms_form_id_with_http_info(form_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ScriptsApi#get_publishedforms_form_id ..."
  end
  
  # verify the required parameter 'form_id' is set
  fail "Missing the required parameter 'form_id' when calling get_publishedforms_form_id" if form_id.nil?
  
  # resource path
  path = "/api/v2/quality/publishedforms/{formId}".sub('{format}','json').sub('{' + 'formId' + '}', form_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 = nil
  

  auth_names = ['PureCloud Auth']
  data, status_code, headers = @api_client.call_api(:GET, 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: ScriptsApi#get_publishedforms_form_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_publishedforms_with_http_info(opts = {}) ⇒ Array<(EvaluationFormEntityListing, Fixnum, Hash)>

Get the published evaluation forms.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    Page size

  • :page_number (Integer)

    Page number

  • :name (String)

    Name

Returns:



420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
# File 'lib/purecloud/api/scripts_api.rb', line 420

def get_publishedforms_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ScriptsApi#get_publishedforms ..."
  end
  
  # resource path
  path = "/api/v2/quality/publishedforms".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size']
  query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number']
  query_params[:'name'] = opts[:'name'] if opts[:'name']

  # 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 = nil
  

  auth_names = ['PureCloud Auth']
  data, status_code, headers = @api_client.call_api(:GET, path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'EvaluationFormEntityListing')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ScriptsApi#get_publishedforms\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_scripts(opts = {}) ⇒ ScriptEntityListing

Get the list of scripts

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    Page size

  • :page_number (Integer)

    Page number

  • :expand (String)

    Expand

  • :name (String)

    Name

  • :feature (String)

    Feature

Returns:



594
595
596
597
# File 'lib/purecloud/api/scripts_api.rb', line 594

def get_scripts(opts = {})
  data, status_code, headers = get_scripts_with_http_info(opts)
  return data
end

#get_scripts_with_http_info(opts = {}) ⇒ Array<(ScriptEntityListing, Fixnum, Hash)>

Get the list of scripts

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    Page size

  • :page_number (Integer)

    Page number

  • :expand (String)

    Expand

  • :name (String)

    Name

  • :feature (String)

    Feature

Returns:

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

    ScriptEntityListing data, response status code and response headers



608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
# File 'lib/purecloud/api/scripts_api.rb', line 608

def get_scripts_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ScriptsApi#get_scripts ..."
  end
  
  # resource path
  path = "/api/v2/scripts".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size']
  query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number']
  query_params[:'expand'] = opts[:'expand'] if opts[:'expand']
  query_params[:'name'] = opts[:'name'] if opts[:'name']
  query_params[:'feature'] = opts[:'feature'] if opts[:'feature']

  # 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 = nil
  

  auth_names = ['PureCloud Auth']
  data, status_code, headers = @api_client.call_api(:GET, path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ScriptEntityListing')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ScriptsApi#get_scripts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post_forms(opts = {}) ⇒ EvaluationForm

Create an evaluation form.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:



96
97
98
99
# File 'lib/purecloud/api/scripts_api.rb', line 96

def post_forms(opts = {})
  data, status_code, headers = post_forms_with_http_info(opts)
  return data
end

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

Create an evaluation form.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:

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

    EvaluationForm data, response status code and response headers



106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
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
# File 'lib/purecloud/api/scripts_api.rb', line 106

def post_forms_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ScriptsApi#post_forms ..."
  end
  
  # resource path
  path = "/api/v2/quality/forms".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(opts[:'body'])
  

  auth_names = ['PureCloud Auth']
  data, status_code, headers = @api_client.call_api(:POST, 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: ScriptsApi#post_forms\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post_publishedforms(opts = {}) ⇒ EvaluationForm

Publish an evaluation form.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:



471
472
473
474
# File 'lib/purecloud/api/scripts_api.rb', line 471

def (opts = {})
  data, status_code, headers = (opts)
  return data
end

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

Publish an evaluation form.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:

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

    EvaluationForm data, response status code and response headers



481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
# File 'lib/purecloud/api/scripts_api.rb', line 481

def (opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ScriptsApi#post_publishedforms ..."
  end
  
  # resource path
  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(opts[:'body'])
  

  auth_names = ['PureCloud Auth']
  data, status_code, headers = @api_client.call_api(:POST, 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: ScriptsApi#post_publishedforms\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post_scripts(opts = {}) ⇒ Script

Create a script.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:



661
662
663
664
# File 'lib/purecloud/api/scripts_api.rb', line 661

def post_scripts(opts = {})
  data, status_code, headers = post_scripts_with_http_info(opts)
  return data
end

#post_scripts_with_http_info(opts = {}) ⇒ Array<(Script, Fixnum, Hash)>

Create a script.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:

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

    Script data, response status code and response headers



671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
# File 'lib/purecloud/api/scripts_api.rb', line 671

def post_scripts_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ScriptsApi#post_scripts ..."
  end
  
  # resource path
  path = "/api/v2/scripts".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(opts[:'body'])
  

  auth_names = ['PureCloud Auth']
  data, status_code, headers = @api_client.call_api(:POST, path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Script')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ScriptsApi#post_scripts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#put_forms_form_id(form_id, opts = {}) ⇒ EvaluationForm

Update an evaluation form.

Parameters:

  • form_id

    Form ID

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

    the optional parameters

Options Hash (opts):

Returns:



216
217
218
219
# File 'lib/purecloud/api/scripts_api.rb', line 216

def put_forms_form_id(form_id, opts = {})
  data, status_code, headers = put_forms_form_id_with_http_info(form_id, opts)
  return data
end

#put_forms_form_id_with_http_info(form_id, opts = {}) ⇒ Array<(EvaluationForm, Fixnum, Hash)>

Update an evaluation form.

Parameters:

  • form_id

    Form ID

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

    the optional parameters

Options Hash (opts):

Returns:

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

    EvaluationForm data, response status code and response headers



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
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
# File 'lib/purecloud/api/scripts_api.rb', line 227

def put_forms_form_id_with_http_info(form_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ScriptsApi#put_forms_form_id ..."
  end
  
  # verify the required parameter 'form_id' is set
  fail "Missing the required parameter 'form_id' when calling put_forms_form_id" if form_id.nil?
  
  # resource path
  path = "/api/v2/quality/forms/{formId}".sub('{format}','json').sub('{' + 'formId' + '}', form_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(:PUT, 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: ScriptsApi#put_forms_form_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end