Class: PureCloud::GreetingsApi

Inherits:
Object
  • Object
show all
Defined in:
lib/purecloudclient_v2a/api/greetings_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ GreetingsApi

Returns a new instance of GreetingsApi.



23
24
25
# File 'lib/purecloudclient_v2a/api/greetings_api.rb', line 23

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

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



21
22
23
# File 'lib/purecloudclient_v2a/api/greetings_api.rb', line 21

def api_client
  @api_client
end

Instance Method Details

#delete_greeting(greeting_id, opts = {}) ⇒ nil

Deletes a Greeting with the given GreetingId

Parameters:

  • greeting_id

    Greeting ID

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

    the optional parameters

Returns:

  • (nil)


32
33
34
35
# File 'lib/purecloudclient_v2a/api/greetings_api.rb', line 32

def delete_greeting(greeting_id, opts = {})
  delete_greeting_with_http_info(greeting_id, opts)
  return nil
end

#delete_greeting_with_http_info(greeting_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Deletes a Greeting with the given GreetingId

Parameters:

  • greeting_id

    Greeting ID

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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/purecloudclient_v2a/api/greetings_api.rb', line 42

def delete_greeting_with_http_info(greeting_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: GreetingsApi.delete_greeting ..."
  end
  
  
  # verify the required parameter 'greeting_id' is set
  fail ArgumentError, "Missing the required parameter 'greeting_id' when calling GreetingsApi.delete_greeting" if greeting_id.nil?
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/greetings/{greetingId}".sub('{format}','json').sub('{' + 'greetingId' + '}', greeting_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

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

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_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, 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: GreetingsApi#delete_greeting\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_greeting(greeting_id, opts = {}) ⇒ Greeting

Get a Greeting with the given GreetingId

Parameters:

  • greeting_id

    Greeting ID

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

    the optional parameters

Returns:



96
97
98
99
# File 'lib/purecloudclient_v2a/api/greetings_api.rb', line 96

def get_greeting(greeting_id, opts = {})
  data, _status_code, _headers = get_greeting_with_http_info(greeting_id, opts)
  return data
end

#get_greeting_media(greeting_id, opts = {}) ⇒ GreetingMediaInfo

Get media playback URI for this greeting

Parameters:

  • greeting_id

    Greeting ID

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

    the optional parameters

Options Hash (opts):

  • :format_id (String)

    The desired media format. (default to WAV)

Returns:



162
163
164
165
# File 'lib/purecloudclient_v2a/api/greetings_api.rb', line 162

def get_greeting_media(greeting_id, opts = {})
  data, _status_code, _headers = get_greeting_media_with_http_info(greeting_id, opts)
  return data
end

#get_greeting_media_with_http_info(greeting_id, opts = {}) ⇒ Array<(GreetingMediaInfo, Fixnum, Hash)>

Get media playback URI for this greeting

Parameters:

  • greeting_id

    Greeting ID

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

    the optional parameters

Options Hash (opts):

  • :format_id (String)

    The desired media format.

Returns:

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

    GreetingMediaInfo data, response status code and response headers



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
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
# File 'lib/purecloudclient_v2a/api/greetings_api.rb', line 173

def get_greeting_media_with_http_info(greeting_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: GreetingsApi.get_greeting_media ..."
  end
  
  
  # verify the required parameter 'greeting_id' is set
  fail ArgumentError, "Missing the required parameter 'greeting_id' when calling GreetingsApi.get_greeting_media" if greeting_id.nil?
  
  
  
  
  
  
  
  
  if opts[:'format_id'] && !['WAV', 'WEBM', 'WAV_ULAW', 'OGG_VORBIS', 'OGG_OPUS', 'MP3', 'NONE'].include?(opts[:'format_id'])
    fail ArgumentError, 'invalid value for "format_id", must be one of WAV, WEBM, WAV_ULAW, OGG_VORBIS, OGG_OPUS, MP3, NONE'
  end
  
  
  
  
  # resource path
  local_var_path = "/api/v2/greetings/{greetingId}/media".sub('{format}','json').sub('{' + 'greetingId' + '}', greeting_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'formatId'] = opts[:'format_id'] if opts[:'format_id']

  # header parameters
  header_params = {}

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

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_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, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'GreetingMediaInfo')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: GreetingsApi#get_greeting_media\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_greeting_with_http_info(greeting_id, opts = {}) ⇒ Array<(Greeting, Fixnum, Hash)>

Get a Greeting with the given GreetingId

Parameters:

  • greeting_id

    Greeting ID

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

    the optional parameters

Returns:

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

    Greeting 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
148
149
150
151
152
153
154
# File 'lib/purecloudclient_v2a/api/greetings_api.rb', line 106

def get_greeting_with_http_info(greeting_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: GreetingsApi.get_greeting ..."
  end
  
  
  # verify the required parameter 'greeting_id' is set
  fail ArgumentError, "Missing the required parameter 'greeting_id' when calling GreetingsApi.get_greeting" if greeting_id.nil?
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/greetings/{greetingId}".sub('{format}','json').sub('{' + 'greetingId' + '}', greeting_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

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

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_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, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Greeting')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: GreetingsApi#get_greeting\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_greetings(opts = {}) ⇒ DomainEntityListing

Gets an Organization’s Greetings

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    Page size (default to 25)

  • :page_number (Integer)

    Page number (default to 1)

Returns:



240
241
242
243
# File 'lib/purecloudclient_v2a/api/greetings_api.rb', line 240

def get_greetings(opts = {})
  data, _status_code, _headers = get_greetings_with_http_info(opts)
  return data
end

#get_greetings_defaults(opts = {}) ⇒ DefaultGreetingList

Get an Organization’s DefaultGreetingList

Parameters:

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

    the optional parameters

Returns:



311
312
313
314
# File 'lib/purecloudclient_v2a/api/greetings_api.rb', line 311

def get_greetings_defaults(opts = {})
  data, _status_code, _headers = get_greetings_defaults_with_http_info(opts)
  return data
end

#get_greetings_defaults_with_http_info(opts = {}) ⇒ Array<(DefaultGreetingList, Fixnum, Hash)>

Get an Organization&#39;s DefaultGreetingList

Parameters:

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

    the optional parameters

Returns:

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

    DefaultGreetingList data, response status code and response headers



320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
# File 'lib/purecloudclient_v2a/api/greetings_api.rb', line 320

def get_greetings_defaults_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: GreetingsApi.get_greetings_defaults ..."
  end
  
  # resource path
  local_var_path = "/api/v2/greetings/defaults".sub('{format}','json')

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

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

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_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, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'DefaultGreetingList')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: GreetingsApi#get_greetings_defaults\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_greetings_with_http_info(opts = {}) ⇒ Array<(DomainEntityListing, Fixnum, Hash)>

Gets an Organization&#39;s Greetings

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    Page size

  • :page_number (Integer)

    Page number

Returns:

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

    DomainEntityListing data, response status code and response headers



251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
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
# File 'lib/purecloudclient_v2a/api/greetings_api.rb', line 251

def get_greetings_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: GreetingsApi.get_greetings ..."
  end
  
  
  
  
  
  
  
  
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/greetings".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']

  # header parameters
  header_params = {}

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

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_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, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'DomainEntityListing')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: GreetingsApi#get_greetings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_group_greetings(group_id, opts = {}) ⇒ GreetingListing

Get a list of the Group’s Greetings

Parameters:

  • group_id

    Group ID

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    Page size (default to 25)

  • :page_number (Integer)

    Page number (default to 1)

Returns:



369
370
371
372
# File 'lib/purecloudclient_v2a/api/greetings_api.rb', line 369

def get_group_greetings(group_id, opts = {})
  data, _status_code, _headers = get_group_greetings_with_http_info(group_id, opts)
  return data
end

#get_group_greetings_defaults(group_id, opts = {}) ⇒ DefaultGreetingList

Grabs the list of Default Greetings given a Group’s ID

Parameters:

  • group_id

    Group ID

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

    the optional parameters

Returns:



450
451
452
453
# File 'lib/purecloudclient_v2a/api/greetings_api.rb', line 450

def get_group_greetings_defaults(group_id, opts = {})
  data, _status_code, _headers = get_group_greetings_defaults_with_http_info(group_id, opts)
  return data
end

#get_group_greetings_defaults_with_http_info(group_id, opts = {}) ⇒ Array<(DefaultGreetingList, Fixnum, Hash)>

Grabs the list of Default Greetings given a Group&#39;s ID

Parameters:

  • group_id

    Group ID

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

    the optional parameters

Returns:

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

    DefaultGreetingList data, response status code and response headers



460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
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
# File 'lib/purecloudclient_v2a/api/greetings_api.rb', line 460

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

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

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

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_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, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'DefaultGreetingList')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: GreetingsApi#get_group_greetings_defaults\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_group_greetings_with_http_info(group_id, opts = {}) ⇒ Array<(GreetingListing, Fixnum, Hash)>

Get a list of the Group&#39;s Greetings

Parameters:

  • group_id

    Group ID

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    Page size

  • :page_number (Integer)

    Page number

Returns:

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

    GreetingListing data, response status code and response headers



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
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
# File 'lib/purecloudclient_v2a/api/greetings_api.rb', line 381

def get_group_greetings_with_http_info(group_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: GreetingsApi.get_group_greetings ..."
  end
  
  
  # verify the required parameter 'group_id' is set
  fail ArgumentError, "Missing the required parameter 'group_id' when calling GreetingsApi.get_group_greetings" if group_id.nil?
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/groups/{groupId}/greetings".sub('{format}','json').sub('{' + 'groupId' + '}', group_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)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_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, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'GreetingListing')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: GreetingsApi#get_group_greetings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_user_greetings(user_id, opts = {}) ⇒ DomainEntityListing

Get a list of the User’s Greetings

Parameters:

  • user_id

    User ID

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    Page size (default to 25)

  • :page_number (Integer)

    Page number (default to 1)

Returns:



517
518
519
520
# File 'lib/purecloudclient_v2a/api/greetings_api.rb', line 517

def get_user_greetings(user_id, opts = {})
  data, _status_code, _headers = get_user_greetings_with_http_info(user_id, opts)
  return data
end

#get_user_greetings_defaults(user_id, opts = {}) ⇒ DefaultGreetingList

Grabs the list of Default Greetings given a User’s ID

Parameters:

  • user_id

    User ID

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

    the optional parameters

Returns:



598
599
600
601
# File 'lib/purecloudclient_v2a/api/greetings_api.rb', line 598

def get_user_greetings_defaults(user_id, opts = {})
  data, _status_code, _headers = get_user_greetings_defaults_with_http_info(user_id, opts)
  return data
end

#get_user_greetings_defaults_with_http_info(user_id, opts = {}) ⇒ Array<(DefaultGreetingList, Fixnum, Hash)>

Grabs the list of Default Greetings given a User&#39;s ID

Parameters:

  • user_id

    User ID

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

    the optional parameters

Returns:

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

    DefaultGreetingList 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
655
656
# File 'lib/purecloudclient_v2a/api/greetings_api.rb', line 608

def get_user_greetings_defaults_with_http_info(user_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: GreetingsApi.get_user_greetings_defaults ..."
  end
  
  
  # verify the required parameter 'user_id' is set
  fail ArgumentError, "Missing the required parameter 'user_id' when calling GreetingsApi.get_user_greetings_defaults" if user_id.nil?
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/users/{userId}/greetings/defaults".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

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

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_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, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'DefaultGreetingList')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: GreetingsApi#get_user_greetings_defaults\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_user_greetings_with_http_info(user_id, opts = {}) ⇒ Array<(DomainEntityListing, Fixnum, Hash)>

Get a list of the User&#39;s Greetings

Parameters:

  • user_id

    User ID

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    Page size

  • :page_number (Integer)

    Page number

Returns:

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

    DomainEntityListing data, response status code and response headers



529
530
531
532
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
578
579
580
581
582
583
584
585
586
587
588
589
590
591
# File 'lib/purecloudclient_v2a/api/greetings_api.rb', line 529

def get_user_greetings_with_http_info(user_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: GreetingsApi.get_user_greetings ..."
  end
  
  
  # verify the required parameter 'user_id' is set
  fail ArgumentError, "Missing the required parameter 'user_id' when calling GreetingsApi.get_user_greetings" if user_id.nil?
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/users/{userId}/greetings".sub('{format}','json').sub('{' + 'userId' + '}', user_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)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_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, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'DomainEntityListing')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: GreetingsApi#get_user_greetings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post_greetings(body, opts = {}) ⇒ Greeting

Create a Greeting for an Organization

Parameters:

  • body

    The Greeting to create

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

    the optional parameters

Returns:



663
664
665
666
# File 'lib/purecloudclient_v2a/api/greetings_api.rb', line 663

def post_greetings(body, opts = {})
  data, _status_code, _headers = post_greetings_with_http_info(body, opts)
  return data
end

#post_greetings_with_http_info(body, opts = {}) ⇒ Array<(Greeting, Fixnum, Hash)>

Create a Greeting for an Organization

Parameters:

  • body

    The Greeting to create

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

    the optional parameters

Returns:

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

    Greeting data, response status code and response headers



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
713
714
715
716
717
718
719
720
721
# File 'lib/purecloudclient_v2a/api/greetings_api.rb', line 673

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

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

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

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_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 => 'Greeting')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: GreetingsApi#post_greetings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post_group_greetings(group_id, body, opts = {}) ⇒ Greeting

Creates a Greeting for a Group

Parameters:

  • group_id

    Group ID

  • body

    The Greeting to create

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

    the optional parameters

Returns:



729
730
731
732
# File 'lib/purecloudclient_v2a/api/greetings_api.rb', line 729

def post_group_greetings(group_id, body, opts = {})
  data, _status_code, _headers = post_group_greetings_with_http_info(group_id, body, opts)
  return data
end

#post_group_greetings_with_http_info(group_id, body, opts = {}) ⇒ Array<(Greeting, Fixnum, Hash)>

Creates a Greeting for a Group

Parameters:

  • group_id

    Group ID

  • body

    The Greeting to create

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

    the optional parameters

Returns:

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

    Greeting data, response status code and response headers



740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
# File 'lib/purecloudclient_v2a/api/greetings_api.rb', line 740

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

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

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

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_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 => 'Greeting')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: GreetingsApi#post_group_greetings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post_user_greetings(user_id, body, opts = {}) ⇒ Greeting

Creates a Greeting for a User

Parameters:

  • user_id

    User ID

  • body

    The Greeting to create

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

    the optional parameters

Returns:



804
805
806
807
# File 'lib/purecloudclient_v2a/api/greetings_api.rb', line 804

def post_user_greetings(user_id, body, opts = {})
  data, _status_code, _headers = post_user_greetings_with_http_info(user_id, body, opts)
  return data
end

#post_user_greetings_with_http_info(user_id, body, opts = {}) ⇒ Array<(Greeting, Fixnum, Hash)>

Creates a Greeting for a User

Parameters:

  • user_id

    User ID

  • body

    The Greeting to create

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

    the optional parameters

Returns:

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

    Greeting data, response status code and response headers



815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
# File 'lib/purecloudclient_v2a/api/greetings_api.rb', line 815

def post_user_greetings_with_http_info(user_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: GreetingsApi.post_user_greetings ..."
  end
  
  
  # verify the required parameter 'user_id' is set
  fail ArgumentError, "Missing the required parameter 'user_id' when calling GreetingsApi.post_user_greetings" if user_id.nil?
  
  
  
  
  
  
  # verify the required parameter 'body' is set
  fail ArgumentError, "Missing the required parameter 'body' when calling GreetingsApi.post_user_greetings" if body.nil?
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/users/{userId}/greetings".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

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

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_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 => 'Greeting')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: GreetingsApi#post_user_greetings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#put_greeting(greeting_id, body, opts = {}) ⇒ Greeting

Updates the Greeting with the given GreetingId

Parameters:

  • greeting_id

    Greeting ID

  • body

    The updated Greeting

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

    the optional parameters

Returns:



879
880
881
882
# File 'lib/purecloudclient_v2a/api/greetings_api.rb', line 879

def put_greeting(greeting_id, body, opts = {})
  data, _status_code, _headers = put_greeting_with_http_info(greeting_id, body, opts)
  return data
end

#put_greeting_with_http_info(greeting_id, body, opts = {}) ⇒ Array<(Greeting, Fixnum, Hash)>

Updates the Greeting with the given GreetingId

Parameters:

  • greeting_id

    Greeting ID

  • body

    The updated Greeting

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

    the optional parameters

Returns:

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

    Greeting data, response status code and response headers



890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
# File 'lib/purecloudclient_v2a/api/greetings_api.rb', line 890

def put_greeting_with_http_info(greeting_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: GreetingsApi.put_greeting ..."
  end
  
  
  # verify the required parameter 'greeting_id' is set
  fail ArgumentError, "Missing the required parameter 'greeting_id' when calling GreetingsApi.put_greeting" if greeting_id.nil?
  
  
  
  
  
  
  # verify the required parameter 'body' is set
  fail ArgumentError, "Missing the required parameter 'body' when calling GreetingsApi.put_greeting" if body.nil?
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/greetings/{greetingId}".sub('{format}','json').sub('{' + 'greetingId' + '}', greeting_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

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

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_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(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Greeting')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: GreetingsApi#put_greeting\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#put_greetings_defaults(body, opts = {}) ⇒ DefaultGreetingList

Update an Organization’s DefaultGreetingList

Parameters:

  • body

    The updated defaultGreetingList

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

    the optional parameters

Returns:



953
954
955
956
# File 'lib/purecloudclient_v2a/api/greetings_api.rb', line 953

def put_greetings_defaults(body, opts = {})
  data, _status_code, _headers = put_greetings_defaults_with_http_info(body, opts)
  return data
end

#put_greetings_defaults_with_http_info(body, opts = {}) ⇒ Array<(DefaultGreetingList, Fixnum, Hash)>

Update an Organization&#39;s DefaultGreetingList

Parameters:

  • body

    The updated defaultGreetingList

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

    the optional parameters

Returns:

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

    DefaultGreetingList data, response status code and response headers



963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
# File 'lib/purecloudclient_v2a/api/greetings_api.rb', line 963

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

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

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

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_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(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'DefaultGreetingList')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: GreetingsApi#put_greetings_defaults\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#put_group_greetings_defaults(group_id, body, opts = {}) ⇒ DefaultGreetingList

Updates the DefaultGreetingList of the specified Group

Parameters:

  • group_id

    Group ID

  • body

    The updated defaultGreetingList

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

    the optional parameters

Returns:



1019
1020
1021
1022
# File 'lib/purecloudclient_v2a/api/greetings_api.rb', line 1019

def put_group_greetings_defaults(group_id, body, opts = {})
  data, _status_code, _headers = put_group_greetings_defaults_with_http_info(group_id, body, opts)
  return data
end

#put_group_greetings_defaults_with_http_info(group_id, body, opts = {}) ⇒ Array<(DefaultGreetingList, Fixnum, Hash)>

Updates the DefaultGreetingList of the specified Group

Parameters:

  • group_id

    Group ID

  • body

    The updated defaultGreetingList

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

    the optional parameters

Returns:

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

    DefaultGreetingList data, response status code and response headers



1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
# File 'lib/purecloudclient_v2a/api/greetings_api.rb', line 1030

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

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

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

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_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(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'DefaultGreetingList')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: GreetingsApi#put_group_greetings_defaults\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#put_user_greetings_defaults(user_id, body, opts = {}) ⇒ DefaultGreetingList

Updates the DefaultGreetingList of the specified User

Parameters:

  • user_id

    User ID

  • body

    The updated defaultGreetingList

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

    the optional parameters

Returns:



1094
1095
1096
1097
# File 'lib/purecloudclient_v2a/api/greetings_api.rb', line 1094

def put_user_greetings_defaults(user_id, body, opts = {})
  data, _status_code, _headers = put_user_greetings_defaults_with_http_info(user_id, body, opts)
  return data
end

#put_user_greetings_defaults_with_http_info(user_id, body, opts = {}) ⇒ Array<(DefaultGreetingList, Fixnum, Hash)>

Updates the DefaultGreetingList of the specified User

Parameters:

  • user_id

    User ID

  • body

    The updated defaultGreetingList

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

    the optional parameters

Returns:

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

    DefaultGreetingList data, response status code and response headers



1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
# File 'lib/purecloudclient_v2a/api/greetings_api.rb', line 1105

def put_user_greetings_defaults_with_http_info(user_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: GreetingsApi.put_user_greetings_defaults ..."
  end
  
  
  # verify the required parameter 'user_id' is set
  fail ArgumentError, "Missing the required parameter 'user_id' when calling GreetingsApi.put_user_greetings_defaults" if user_id.nil?
  
  
  
  
  
  
  # verify the required parameter 'body' is set
  fail ArgumentError, "Missing the required parameter 'body' when calling GreetingsApi.put_user_greetings_defaults" if body.nil?
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/users/{userId}/greetings/defaults".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

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

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_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(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'DefaultGreetingList')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: GreetingsApi#put_user_greetings_defaults\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end