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



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

#create(opts = {}) ⇒ Script

Create a script.

Options Hash (opts):



655
656
657
658
# File 'lib/purecloud/api/scripts_api.rb', line 655

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

#create_forms(opts = {}) ⇒ EvaluationForm

Create an evaluation form.

Options Hash (opts):



90
91
92
93
# File 'lib/purecloud/api/scripts_api.rb', line 90

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

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

Create an evaluation form.

Options Hash (opts):



100
101
102
103
104
105
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
# File 'lib/purecloud/api/scripts_api.rb', line 100

def create_forms_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ScriptsApi#create_forms ..."
  end
  
  # resource path
  path = "/api/v1/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#create_forms\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_publishedforms(opts = {}) ⇒ EvaluationForm

Publish an evaluation form.

Options Hash (opts):



465
466
467
468
# File 'lib/purecloud/api/scripts_api.rb', line 465

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

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

Publish an evaluation form.

Options Hash (opts):



475
476
477
478
479
480
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
# File 'lib/purecloud/api/scripts_api.rb', line 475

def create_publishedforms_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ScriptsApi#create_publishedforms ..."
  end
  
  # resource path
  path = "/api/v1/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#create_publishedforms\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

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

Create a script.

Options Hash (opts):



665
666
667
668
669
670
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
# File 'lib/purecloud/api/scripts_api.rb', line 665

def create_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ScriptsApi#create ..."
  end
  
  # resource path
  path = "/api/v1/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#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

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

Delete an evaluation form.



272
273
274
275
# File 'lib/purecloud/api/scripts_api.rb', line 272

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

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

Delete an evaluation form.



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

def delete_form_with_http_info(form_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ScriptsApi#delete_form ..."
  end
  
  # verify the required parameter 'form_id' is set
  fail "Missing the required parameter 'form_id' when calling delete_form" if form_id.nil?
  
  # resource path
  path = "/api/v1/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_form\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get(opts = {}) ⇒ ScriptEntityListing

Get the list of scripts

Options Hash (opts):

  • :page_size (Integer)

    Page size

  • :page_number (Integer)

    Page number

  • :expand (String)

    Expand

  • :name (String)

    Name

  • :feature (String)

    Feature



588
589
590
591
# File 'lib/purecloud/api/scripts_api.rb', line 588

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

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

Get an evaluation form



148
149
150
151
# File 'lib/purecloud/api/scripts_api.rb', line 148

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

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

Gets all the revisions for a specific evaluation.

Options Hash (opts):

  • :page_size (Integer)

    Page size

  • :page_number (Integer)

    Page number



335
336
337
338
# File 'lib/purecloud/api/scripts_api.rb', line 335

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

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

Gets all the revisions for a specific evaluation.

Options Hash (opts):

  • :page_size (Integer)

    Page size

  • :page_number (Integer)

    Page number



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

def get_form_versions_with_http_info(form_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ScriptsApi#get_form_versions ..."
  end
  
  # verify the required parameter 'form_id' is set
  fail "Missing the required parameter 'form_id' when calling get_form_versions" if form_id.nil?
  
  # resource path
  path = "/api/v1/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_form_versions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

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

Get an evaluation form



158
159
160
161
162
163
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
# File 'lib/purecloud/api/scripts_api.rb', line 158

def get_form_with_http_info(form_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ScriptsApi#get_form ..."
  end
  
  # verify the required parameter 'form_id' is set
  fail "Missing the required parameter 'form_id' when calling get_form" if form_id.nil?
  
  # resource path
  path = "/api/v1/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_form\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

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

  • :expand2 (String)

    Expand

  • :name (String)

    Name



21
22
23
24
# File 'lib/purecloud/api/scripts_api.rb', line 21

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

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

Get the list of evaluation forms

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

  • :expand2 (String)

    Expand

  • :name (String)

    Name



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

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/v1/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[:'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.

Options Hash (opts):

  • :page_size (Integer)

    Page size

  • :page_number (Integer)

    Page number

  • :name (String)

    Name



402
403
404
405
# File 'lib/purecloud/api/scripts_api.rb', line 402

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

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

Get the published evaluation forms.



523
524
525
526
# File 'lib/purecloud/api/scripts_api.rb', line 523

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

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

Get the published evaluation forms.



533
534
535
536
537
538
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
# File 'lib/purecloud/api/scripts_api.rb', line 533

def get_publishedforms_form_with_http_info(form_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ScriptsApi#get_publishedforms_form ..."
  end
  
  # verify the required parameter 'form_id' is set
  fail "Missing the required parameter 'form_id' when calling get_publishedforms_form" if form_id.nil?
  
  # resource path
  path = "/api/v1/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\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.

Options Hash (opts):

  • :page_size (Integer)

    Page size

  • :page_number (Integer)

    Page number

  • :name (String)

    Name



414
415
416
417
418
419
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
# File 'lib/purecloud/api/scripts_api.rb', line 414

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/v1/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_with_http_info(opts = {}) ⇒ Array<(ScriptEntityListing, Fixnum, Hash)>

Get the list of scripts

Options Hash (opts):

  • :page_size (Integer)

    Page size

  • :page_number (Integer)

    Page number

  • :expand (String)

    Expand

  • :name (String)

    Name

  • :feature (String)

    Feature



602
603
604
605
606
607
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
# File 'lib/purecloud/api/scripts_api.rb', line 602

def get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ScriptsApi#get ..."
  end
  
  # resource path
  path = "/api/v1/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\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

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

Update an evaluation form.

Options Hash (opts):



210
211
212
213
# File 'lib/purecloud/api/scripts_api.rb', line 210

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

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

Update an evaluation form.

Options Hash (opts):



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
256
257
258
259
260
261
262
263
264
265
# File 'lib/purecloud/api/scripts_api.rb', line 221

def update_form_with_http_info(form_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ScriptsApi#update_form ..."
  end
  
  # verify the required parameter 'form_id' is set
  fail "Missing the required parameter 'form_id' when calling update_form" if form_id.nil?
  
  # resource path
  path = "/api/v1/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#update_form\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end