Class: PureCloud::ObjectsApi

Inherits:
Object
  • Object
show all
Defined in:
lib/purecloudplatformclientv2/api/objects_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ ObjectsApi

Returns a new instance of ObjectsApi.



23
24
25
# File 'lib/purecloudplatformclientv2/api/objects_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/purecloudplatformclientv2/api/objects_api.rb', line 21

def api_client
  @api_client
end

Instance Method Details

#delete_authorization_division(division_id, opts = {}) ⇒ nil

Delete a division.

Parameters:

  • division_id

    Division ID

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

    the optional parameters

Options Hash (opts):

  • :force (BOOLEAN)

    Force delete this division as well as the grants and objects associated with it (default to false)

Returns:

  • (nil)


33
34
35
36
# File 'lib/purecloudplatformclientv2/api/objects_api.rb', line 33

def delete_authorization_division(division_id, opts = {})
  delete_authorization_division_with_http_info(division_id, opts)
  return nil
end

#delete_authorization_division_with_http_info(division_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Delete a division.

Parameters:

  • division_id

    Division ID

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

    the optional parameters

Options Hash (opts):

  • :force (BOOLEAN)

    Force delete this division as well as the grants and objects associated with it

Returns:

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

    nil, response status code and response headers



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
90
91
92
93
94
95
96
97
98
# File 'lib/purecloudplatformclientv2/api/objects_api.rb', line 44

def delete_authorization_division_with_http_info(division_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ObjectsApi.delete_authorization_division ..."
  end
  
  
  # verify the required parameter 'division_id' is set
  fail ArgumentError, "Missing the required parameter 'division_id' when calling ObjectsApi.delete_authorization_division" if division_id.nil?
  
  
  
  
  
  
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/authorization/divisions/{divisionId}".sub('{format}','json').sub('{' + 'divisionId' + '}', division_id.to_s)

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

  # 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 OAuth']
  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: ObjectsApi#delete_authorization_division\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_authorization_division(division_id, opts = {}) ⇒ AuthzDivision

Returns an authorization division.

Parameters:

  • division_id

    Division ID

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

    the optional parameters

Options Hash (opts):

  • :object_count (BOOLEAN)

    Get count of objects in this division, grouped by type (default to false)

Returns:



106
107
108
109
# File 'lib/purecloudplatformclientv2/api/objects_api.rb', line 106

def get_authorization_division(division_id, opts = {})
  data, _status_code, _headers = get_authorization_division_with_http_info(division_id, opts)
  return data
end

#get_authorization_division_with_http_info(division_id, opts = {}) ⇒ Array<(AuthzDivision, Fixnum, Hash)>

Returns an authorization division.

Parameters:

  • division_id

    Division ID

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

    the optional parameters

Options Hash (opts):

  • :object_count (BOOLEAN)

    Get count of objects in this division, grouped by type

Returns:

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

    AuthzDivision data, response status code and response headers



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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
# File 'lib/purecloudplatformclientv2/api/objects_api.rb', line 117

def get_authorization_division_with_http_info(division_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ObjectsApi.get_authorization_division ..."
  end
  
  
  # verify the required parameter 'division_id' is set
  fail ArgumentError, "Missing the required parameter 'division_id' when calling ObjectsApi.get_authorization_division" if division_id.nil?
  
  
  
  
  
  
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/authorization/divisions/{divisionId}".sub('{format}','json').sub('{' + 'divisionId' + '}', division_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'objectCount'] = opts[:'object_count'] if opts[:'object_count']

  # 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 OAuth']
  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 => 'AuthzDivision')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ObjectsApi#get_authorization_division\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_authorization_divisions(opts = {}) ⇒ AuthzDivisionEntityListing

Retrieve a list of all divisions defined for the organization Request specific divisions by id using a query param "id", e.g. ?id=5f777167-63be-4c24-ad41-374155d9e28b&id=72e9fb25-c484-488d-9312-7acba82435b3

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The total page size requested (default to 25)

  • :page_number (Integer)

    The page number requested (default to 1)

  • :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

  • :object_count (BOOLEAN)

    Include the count of objects contained in the division (default to false)

  • :id (Array<String>)

    Optionally request specific divisions by their IDs

  • :name (String)

    Search term to filter by division name

Returns:



187
188
189
190
# File 'lib/purecloudplatformclientv2/api/objects_api.rb', line 187

def get_authorization_divisions(opts = {})
  data, _status_code, _headers = get_authorization_divisions_with_http_info(opts)
  return data
end

#get_authorization_divisions_home(opts = {}) ⇒ AuthzDivision

Retrieve the home division for the organization. Will not include object counts.

Parameters:

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

    the optional parameters

Returns:



314
315
316
317
# File 'lib/purecloudplatformclientv2/api/objects_api.rb', line 314

def get_authorization_divisions_home(opts = {})
  data, _status_code, _headers = get_authorization_divisions_home_with_http_info(opts)
  return data
end

#get_authorization_divisions_home_with_http_info(opts = {}) ⇒ Array<(AuthzDivision, Fixnum, Hash)>

Retrieve the home division for the organization. Will not include object counts.

Parameters:

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

    the optional parameters

Returns:

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

    AuthzDivision data, response status code and response headers



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
361
362
363
# File 'lib/purecloudplatformclientv2/api/objects_api.rb', line 323

def get_authorization_divisions_home_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ObjectsApi.get_authorization_divisions_home ..."
  end
  
  # resource path
  local_var_path = "/api/v2/authorization/divisions/home".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 OAuth']
  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 => 'AuthzDivision')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ObjectsApi#get_authorization_divisions_home\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_authorization_divisions_limit(opts = {}) ⇒ Integer

Returns the maximum allowed number of divisions.

Parameters:

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

    the optional parameters

Returns:

  • (Integer)


369
370
371
372
# File 'lib/purecloudplatformclientv2/api/objects_api.rb', line 369

def get_authorization_divisions_limit(opts = {})
  data, _status_code, _headers = get_authorization_divisions_limit_with_http_info(opts)
  return data
end

#get_authorization_divisions_limit_with_http_info(opts = {}) ⇒ Array<(Integer, Fixnum, Hash)>

Returns the maximum allowed number of divisions.

Parameters:

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

    the optional parameters

Returns:

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

    Integer data, response status code and response headers



378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
# File 'lib/purecloudplatformclientv2/api/objects_api.rb', line 378

def get_authorization_divisions_limit_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ObjectsApi.get_authorization_divisions_limit ..."
  end
  
  # resource path
  local_var_path = "/api/v2/authorization/divisions/limit".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 OAuth']
  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 => 'Integer')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ObjectsApi#get_authorization_divisions_limit\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_authorization_divisions_with_http_info(opts = {}) ⇒ Array<(AuthzDivisionEntityListing, Fixnum, Hash)>

Retrieve a list of all divisions defined for the organization Request specific divisions by id using a query param &quot;id&quot;, e.g. ?id=5f777167-63be-4c24-ad41-374155d9e28b&amp;id=72e9fb25-c484-488d-9312-7acba82435b3

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

  • :object_count (BOOLEAN)

    Include the count of objects contained in the division

  • :id (Array<String>)

    Optionally request specific divisions by their IDs

  • :name (String)

    Search term to filter by division name

Returns:

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

    AuthzDivisionEntityListing data, response status code and response headers



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
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
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
306
307
308
# File 'lib/purecloudplatformclientv2/api/objects_api.rb', line 205

def get_authorization_divisions_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ObjectsApi.get_authorization_divisions ..."
  end
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/authorization/divisions".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[:'objectCount'] = opts[:'object_count'] if opts[:'object_count']
  query_params[:'id'] = @api_client.build_collection_param(opts[:'id'], :multi) if opts[:'id']
  query_params[:'name'] = opts[:'name'] if opts[:'name']

  # 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 OAuth']
  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 => 'AuthzDivisionEntityListing')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ObjectsApi#get_authorization_divisions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post_authorization_division_object(division_id, object_type, body, opts = {}) ⇒ nil

Assign a list of objects to a division Set the division of a specified list of objects. The objects must all be of the same type, one of: CAMPAIGN, MANAGEMENTUNIT, FLOW, QUEUE, or USER. The body of the request is a list of object IDs, which are expected to be GUIDs, e.g. ["206ce31f-61ec-40ed-a8b1-be6f06303998","250a754e-f5e4-4f51-800f-a92f09d3bf8c"]

Parameters:

  • division_id

    Division ID

  • object_type

    The type of the objects. Must be one of the valid object types

  • body

    Object Id List

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

    the optional parameters

Returns:

  • (nil)


427
428
429
430
# File 'lib/purecloudplatformclientv2/api/objects_api.rb', line 427

def (division_id, object_type, body, opts = {})
  (division_id, object_type, body, opts)
  return nil
end

#post_authorization_division_object_with_http_info(division_id, object_type, body, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Assign a list of objects to a division Set the division of a specified list of objects. The objects must all be of the same type, one of: CAMPAIGN, MANAGEMENTUNIT, FLOW, QUEUE, or USER. The body of the request is a list of object IDs, which are expected to be GUIDs, e.g. [&quot;206ce31f-61ec-40ed-a8b1-be6f06303998&quot;,&quot;250a754e-f5e4-4f51-800f-a92f09d3bf8c&quot;]

Parameters:

  • division_id

    Division ID

  • object_type

    The type of the objects. Must be one of the valid object types

  • body

    Object Id List

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
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
# File 'lib/purecloudplatformclientv2/api/objects_api.rb', line 439

def (division_id, object_type, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ObjectsApi.post_authorization_division_object ..."
  end
  
  
  # verify the required parameter 'division_id' is set
  fail ArgumentError, "Missing the required parameter 'division_id' when calling ObjectsApi.post_authorization_division_object" if division_id.nil?
  
  
  
  
  
  
  # verify the required parameter 'object_type' is set
  fail ArgumentError, "Missing the required parameter 'object_type' when calling ObjectsApi.post_authorization_division_object" if object_type.nil?
  
  # verify enum value
  unless ['QUEUE', 'CAMPAIGN', 'CONTACTLIST', 'DNCLIST', 'MESSAGINGCAMPAIGN', 'MANAGEMENTUNIT', 'BUSINESSUNIT', 'FLOW', 'USER'].include?(object_type)
    fail ArgumentError, "invalid value for 'object_type', must be one of QUEUE, CAMPAIGN, CONTACTLIST, DNCLIST, MESSAGINGCAMPAIGN, MANAGEMENTUNIT, BUSINESSUNIT, FLOW, USER"
  end
  
  
  
  
  
  
  # verify the required parameter 'body' is set
  fail ArgumentError, "Missing the required parameter 'body' when calling ObjectsApi.post_authorization_division_object" if body.nil?
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/authorization/divisions/{divisionId}/objects/{objectType}".sub('{format}','json').sub('{' + 'divisionId' + '}', division_id.to_s).sub('{' + 'objectType' + '}', object_type.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 OAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ObjectsApi#post_authorization_division_object\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post_authorization_divisions(body, opts = {}) ⇒ AuthzDivision

Create a division.

Parameters:

  • body

    Division

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

    the optional parameters

Returns:



514
515
516
517
# File 'lib/purecloudplatformclientv2/api/objects_api.rb', line 514

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

#post_authorization_divisions_with_http_info(body, opts = {}) ⇒ Array<(AuthzDivision, Fixnum, Hash)>

Create a division.

Parameters:

  • body

    Division

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

    the optional parameters

Returns:

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

    AuthzDivision data, response status code and response headers



524
525
526
527
528
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
# File 'lib/purecloudplatformclientv2/api/objects_api.rb', line 524

def (body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ObjectsApi.post_authorization_divisions ..."
  end
  
  
  # verify the required parameter 'body' is set
  fail ArgumentError, "Missing the required parameter 'body' when calling ObjectsApi.post_authorization_divisions" if body.nil?
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/authorization/divisions".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 OAuth']
  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 => 'AuthzDivision')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ObjectsApi#post_authorization_divisions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#put_authorization_division(division_id, body, opts = {}) ⇒ AuthzDivision

Update a division.

Parameters:

  • division_id

    Division ID

  • body

    Updated division data

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

    the optional parameters

Returns:



580
581
582
583
# File 'lib/purecloudplatformclientv2/api/objects_api.rb', line 580

def put_authorization_division(division_id, body, opts = {})
  data, _status_code, _headers = put_authorization_division_with_http_info(division_id, body, opts)
  return data
end

#put_authorization_division_with_http_info(division_id, body, opts = {}) ⇒ Array<(AuthzDivision, Fixnum, Hash)>

Update a division.

Parameters:

  • division_id

    Division ID

  • body

    Updated division data

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

    the optional parameters

Returns:

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

    AuthzDivision data, response status code and response headers



591
592
593
594
595
596
597
598
599
600
601
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
# File 'lib/purecloudplatformclientv2/api/objects_api.rb', line 591

def put_authorization_division_with_http_info(division_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ObjectsApi.put_authorization_division ..."
  end
  
  
  # verify the required parameter 'division_id' is set
  fail ArgumentError, "Missing the required parameter 'division_id' when calling ObjectsApi.put_authorization_division" if division_id.nil?
  
  
  
  
  
  
  # verify the required parameter 'body' is set
  fail ArgumentError, "Missing the required parameter 'body' when calling ObjectsApi.put_authorization_division" if body.nil?
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/authorization/divisions/{divisionId}".sub('{format}','json').sub('{' + 'divisionId' + '}', division_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 OAuth']
  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 => 'AuthzDivision')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ObjectsApi#put_authorization_division\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end