Class: PureCloud::GroupsApi
- Inherits:
-
Object
- Object
- PureCloud::GroupsApi
- Defined in:
- lib/purecloudplatformclientv2/api/groups_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#delete_group(group_id, opts = {}) ⇒ nil
Delete group.
-
#delete_group_members(group_id, ids, opts = {}) ⇒ Empty
Remove members.
-
#delete_group_members_with_http_info(group_id, ids, opts = {}) ⇒ Array<(Empty, Fixnum, Hash)>
Remove members.
-
#delete_group_with_http_info(group_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete group.
-
#get_fieldconfig(type, opts = {}) ⇒ FieldConfig
Fetch field config for an entity type.
-
#get_fieldconfig_with_http_info(type, opts = {}) ⇒ Array<(FieldConfig, Fixnum, Hash)>
Fetch field config for an entity type.
-
#get_group(group_id, opts = {}) ⇒ Group
Get group.
-
#get_group_individuals(group_id, opts = {}) ⇒ UserEntityListing
Get all individuals associated with the group.
-
#get_group_individuals_with_http_info(group_id, opts = {}) ⇒ Array<(UserEntityListing, Fixnum, Hash)>
Get all individuals associated with the group.
-
#get_group_members(group_id, opts = {}) ⇒ UserEntityListing
Get group members, includes individuals, owners, and dynamically included people.
-
#get_group_members_with_http_info(group_id, opts = {}) ⇒ Array<(UserEntityListing, Fixnum, Hash)>
Get group members, includes individuals, owners, and dynamically included people.
-
#get_group_profile(group_id, opts = {}) ⇒ GroupProfile
Get group profile This api is deprecated.
-
#get_group_profile_with_http_info(group_id, opts = {}) ⇒ Array<(GroupProfile, Fixnum, Hash)>
Get group profile This api is deprecated.
-
#get_group_with_http_info(group_id, opts = {}) ⇒ Array<(Group, Fixnum, Hash)>
Get group.
-
#get_groups(opts = {}) ⇒ GroupEntityListing
Get a group list.
-
#get_groups_search(q64, opts = {}) ⇒ GroupsSearchResponse
Search groups using the q64 value returned from a previous search.
-
#get_groups_search_with_http_info(q64, opts = {}) ⇒ Array<(GroupsSearchResponse, Fixnum, Hash)>
Search groups using the q64 value returned from a previous search.
-
#get_groups_with_http_info(opts = {}) ⇒ Array<(GroupEntityListing, Fixnum, Hash)>
Get a group list.
-
#get_profiles_groups(opts = {}) ⇒ GroupProfileEntityListing
Get group profile listing This api is deprecated.
-
#get_profiles_groups_with_http_info(opts = {}) ⇒ Array<(GroupProfileEntityListing, Fixnum, Hash)>
Get group profile listing This api is deprecated.
-
#initialize(api_client = ApiClient.default) ⇒ GroupsApi
constructor
A new instance of GroupsApi.
-
#post_group_members(group_id, body, opts = {}) ⇒ Empty
Add members.
-
#post_group_members_with_http_info(group_id, body, opts = {}) ⇒ Array<(Empty, Fixnum, Hash)>
Add members.
-
#post_groups(body, opts = {}) ⇒ Group
Create a group.
-
#post_groups_search(body, opts = {}) ⇒ GroupsSearchResponse
Search groups.
-
#post_groups_search_with_http_info(body, opts = {}) ⇒ Array<(GroupsSearchResponse, Fixnum, Hash)>
Search groups.
-
#post_groups_with_http_info(body, opts = {}) ⇒ Array<(Group, Fixnum, Hash)>
Create a group.
-
#put_group(group_id, opts = {}) ⇒ Group
Update group.
-
#put_group_with_http_info(group_id, opts = {}) ⇒ Array<(Group, Fixnum, Hash)>
Update group.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
21 22 23 |
# File 'lib/purecloudplatformclientv2/api/groups_api.rb', line 21 def api_client @api_client end |
Instance Method Details
#delete_group(group_id, opts = {}) ⇒ nil
Delete group
32 33 34 35 |
# File 'lib/purecloudplatformclientv2/api/groups_api.rb', line 32 def delete_group(group_id, opts = {}) delete_group_with_http_info(group_id, opts) return nil end |
#delete_group_members(group_id, ids, opts = {}) ⇒ Empty
Remove members
97 98 99 100 |
# File 'lib/purecloudplatformclientv2/api/groups_api.rb', line 97 def delete_group_members(group_id, ids, opts = {}) data, _status_code, _headers = delete_group_members_with_http_info(group_id, ids, opts) return data end |
#delete_group_members_with_http_info(group_id, ids, opts = {}) ⇒ Array<(Empty, Fixnum, Hash)>
Remove members
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 155 156 157 158 159 160 161 162 163 164 165 |
# File 'lib/purecloudplatformclientv2/api/groups_api.rb', line 108 def delete_group_members_with_http_info(group_id, ids, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: GroupsApi.delete_group_members ..." end # verify the required parameter 'group_id' is set fail ArgumentError, "Missing the required parameter 'group_id' when calling GroupsApi.delete_group_members" if group_id.nil? # verify the required parameter 'ids' is set fail ArgumentError, "Missing the required parameter 'ids' when calling GroupsApi.delete_group_members" if ids.nil? # resource path local_var_path = "/api/v2/groups/{groupId}/members".sub('{format}','json').sub('{' + 'groupId' + '}', group_id.to_s) # query parameters query_params = {} query_params[:'ids'] = ids # 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, :return_type => 'Empty') if @api_client.config.debugging @api_client.config.logger.debug "API called: GroupsApi#delete_group_members\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_group_with_http_info(group_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete group
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/purecloudplatformclientv2/api/groups_api.rb', line 42 def delete_group_with_http_info(group_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: GroupsApi.delete_group ..." end # verify the required parameter 'group_id' is set fail ArgumentError, "Missing the required parameter 'group_id' when calling GroupsApi.delete_group" if group_id.nil? # resource path local_var_path = "/api/v2/groups/{groupId}".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 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: GroupsApi#delete_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_fieldconfig(type, opts = {}) ⇒ FieldConfig
Fetch field config for an entity type
172 173 174 175 |
# File 'lib/purecloudplatformclientv2/api/groups_api.rb', line 172 def get_fieldconfig(type, opts = {}) data, _status_code, _headers = get_fieldconfig_with_http_info(type, opts) return data end |
#get_fieldconfig_with_http_info(type, opts = {}) ⇒ Array<(FieldConfig, Fixnum, Hash)>
Fetch field config for an entity type
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 233 234 235 236 |
# File 'lib/purecloudplatformclientv2/api/groups_api.rb', line 182 def get_fieldconfig_with_http_info(type, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: GroupsApi.get_fieldconfig ..." end # verify the required parameter 'type' is set fail ArgumentError, "Missing the required parameter 'type' when calling GroupsApi.get_fieldconfig" if type.nil? # verify enum value unless ['person', 'group', 'org', 'externalContact'].include?(type) fail ArgumentError, "invalid value for 'type', must be one of person, group, org, externalContact" end # resource path local_var_path = "/api/v2/fieldconfig".sub('{format}','json') # query parameters query_params = {} query_params[:'type'] = type # 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 => 'FieldConfig') if @api_client.config.debugging @api_client.config.logger.debug "API called: GroupsApi#get_fieldconfig\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_group(group_id, opts = {}) ⇒ Group
Get group
243 244 245 246 |
# File 'lib/purecloudplatformclientv2/api/groups_api.rb', line 243 def get_group(group_id, opts = {}) data, _status_code, _headers = get_group_with_http_info(group_id, opts) return data end |
#get_group_individuals(group_id, opts = {}) ⇒ UserEntityListing
Get all individuals associated with the group
308 309 310 311 |
# File 'lib/purecloudplatformclientv2/api/groups_api.rb', line 308 def get_group_individuals(group_id, opts = {}) data, _status_code, _headers = get_group_individuals_with_http_info(group_id, opts) return data end |
#get_group_individuals_with_http_info(group_id, opts = {}) ⇒ Array<(UserEntityListing, Fixnum, Hash)>
Get all individuals associated with the group
318 319 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 361 362 363 364 365 366 |
# File 'lib/purecloudplatformclientv2/api/groups_api.rb', line 318 def get_group_individuals_with_http_info(group_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: GroupsApi.get_group_individuals ..." end # verify the required parameter 'group_id' is set fail ArgumentError, "Missing the required parameter 'group_id' when calling GroupsApi.get_group_individuals" if group_id.nil? # resource path local_var_path = "/api/v2/groups/{groupId}/individuals".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 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 => 'UserEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: GroupsApi#get_group_individuals\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_group_members(group_id, opts = {}) ⇒ UserEntityListing
Get group members, includes individuals, owners, and dynamically included people
377 378 379 380 |
# File 'lib/purecloudplatformclientv2/api/groups_api.rb', line 377 def get_group_members(group_id, opts = {}) data, _status_code, _headers = get_group_members_with_http_info(group_id, opts) return data end |
#get_group_members_with_http_info(group_id, opts = {}) ⇒ Array<(UserEntityListing, Fixnum, Hash)>
Get group members, includes individuals, owners, and dynamically included people
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 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 |
# File 'lib/purecloudplatformclientv2/api/groups_api.rb', line 391 def get_group_members_with_http_info(group_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: GroupsApi.get_group_members ..." end # verify the required parameter 'group_id' is set fail ArgumentError, "Missing the required parameter 'group_id' when calling GroupsApi.get_group_members" if group_id.nil? if opts[:'sort_order'] && !['ascending', 'descending'].include?(opts[:'sort_order']) fail ArgumentError, 'invalid value for "sort_order", must be one of ascending, descending' end # resource path local_var_path = "/api/v2/groups/{groupId}/members".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'] query_params[:'sortOrder'] = opts[:'sort_order'] if opts[:'sort_order'] query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand'] # 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 => 'UserEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: GroupsApi#get_group_members\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_group_profile(group_id, opts = {}) ⇒ GroupProfile
Get group profile This api is deprecated. Use /api/v2/groups instead
479 480 481 482 |
# File 'lib/purecloudplatformclientv2/api/groups_api.rb', line 479 def get_group_profile(group_id, opts = {}) data, _status_code, _headers = get_group_profile_with_http_info(group_id, opts) return data end |
#get_group_profile_with_http_info(group_id, opts = {}) ⇒ Array<(GroupProfile, Fixnum, Hash)>
Get group profile This api is deprecated. Use /api/v2/groups instead
490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 |
# File 'lib/purecloudplatformclientv2/api/groups_api.rb', line 490 def get_group_profile_with_http_info(group_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: GroupsApi.get_group_profile ..." end # verify the required parameter 'group_id' is set fail ArgumentError, "Missing the required parameter 'group_id' when calling GroupsApi.get_group_profile" if group_id.nil? # resource path local_var_path = "/api/v2/groups/{groupId}/profile".sub('{format}','json').sub('{' + 'groupId' + '}', group_id.to_s) # query parameters query_params = {} query_params[:'fields'] = opts[:'fields'] if opts[:'fields'] # 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 => 'GroupProfile') if @api_client.config.debugging @api_client.config.logger.debug "API called: GroupsApi#get_group_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_group_with_http_info(group_id, opts = {}) ⇒ Array<(Group, Fixnum, Hash)>
Get group
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 |
# File 'lib/purecloudplatformclientv2/api/groups_api.rb', line 253 def get_group_with_http_info(group_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: GroupsApi.get_group ..." end # verify the required parameter 'group_id' is set fail ArgumentError, "Missing the required parameter 'group_id' when calling GroupsApi.get_group" if group_id.nil? # resource path local_var_path = "/api/v2/groups/{groupId}".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 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 => 'Group') if @api_client.config.debugging @api_client.config.logger.debug "API called: GroupsApi#get_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_groups(opts = {}) ⇒ GroupEntityListing
Get a group list
556 557 558 559 |
# File 'lib/purecloudplatformclientv2/api/groups_api.rb', line 556 def get_groups(opts = {}) data, _status_code, _headers = get_groups_with_http_info(opts) return data end |
#get_groups_search(q64, opts = {}) ⇒ GroupsSearchResponse
Search groups using the q64 value returned from a previous search
657 658 659 660 |
# File 'lib/purecloudplatformclientv2/api/groups_api.rb', line 657 def get_groups_search(q64, opts = {}) data, _status_code, _headers = get_groups_search_with_http_info(q64, opts) return data end |
#get_groups_search_with_http_info(q64, opts = {}) ⇒ Array<(GroupsSearchResponse, Fixnum, Hash)>
Search groups using the q64 value returned from a previous search
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 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 |
# File 'lib/purecloudplatformclientv2/api/groups_api.rb', line 668 def get_groups_search_with_http_info(q64, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: GroupsApi.get_groups_search ..." end # verify the required parameter 'q64' is set fail ArgumentError, "Missing the required parameter 'q64' when calling GroupsApi.get_groups_search" if q64.nil? # resource path local_var_path = "/api/v2/groups/search".sub('{format}','json') # query parameters query_params = {} query_params[:'q64'] = q64 query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand'] # 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 => 'GroupsSearchResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: GroupsApi#get_groups_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_groups_with_http_info(opts = {}) ⇒ Array<(GroupEntityListing, Fixnum, Hash)>
Get a group list
570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 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 648 649 |
# File 'lib/purecloudplatformclientv2/api/groups_api.rb', line 570 def get_groups_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: GroupsApi.get_groups ..." end if opts[:'sort_order'] && !['ascending', 'descending'].include?(opts[:'sort_order']) fail ArgumentError, 'invalid value for "sort_order", must be one of ascending, descending' end # resource path local_var_path = "/api/v2/groups".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[:'id'] = @api_client.build_collection_param(opts[:'id'], :multi) if opts[:'id'] query_params[:'jabberId'] = @api_client.build_collection_param(opts[:'jabber_id'], :multi) if opts[:'jabber_id'] query_params[:'sortOrder'] = opts[:'sort_order'] if opts[:'sort_order'] # 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 => 'GroupEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: GroupsApi#get_groups\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_profiles_groups(opts = {}) ⇒ GroupProfileEntityListing
Get group profile listing This api is deprecated. Use /api/v2/groups instead.
734 735 736 737 |
# File 'lib/purecloudplatformclientv2/api/groups_api.rb', line 734 def get_profiles_groups(opts = {}) data, _status_code, _headers = get_profiles_groups_with_http_info(opts) return data end |
#get_profiles_groups_with_http_info(opts = {}) ⇒ Array<(GroupProfileEntityListing, Fixnum, Hash)>
Get group profile listing This api is deprecated. Use /api/v2/groups instead.
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 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 |
# File 'lib/purecloudplatformclientv2/api/groups_api.rb', line 747 def get_profiles_groups_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: GroupsApi.get_profiles_groups ..." end if opts[:'sort_order'] && !['ascending', 'descending'].include?(opts[:'sort_order']) fail ArgumentError, 'invalid value for "sort_order", must be one of ascending, descending' end # resource path local_var_path = "/api/v2/profiles/groups".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[:'id'] = @api_client.build_collection_param(opts[:'id'], :multi) if opts[:'id'] query_params[:'sortOrder'] = opts[:'sort_order'] if opts[:'sort_order'] # 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 => 'GroupProfileEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: GroupsApi#get_profiles_groups\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#post_group_members(group_id, body, opts = {}) ⇒ Empty
Add members
827 828 829 830 |
# File 'lib/purecloudplatformclientv2/api/groups_api.rb', line 827 def post_group_members(group_id, body, opts = {}) data, _status_code, _headers = post_group_members_with_http_info(group_id, body, opts) return data end |
#post_group_members_with_http_info(group_id, body, opts = {}) ⇒ Array<(Empty, Fixnum, Hash)>
Add members
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 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 |
# File 'lib/purecloudplatformclientv2/api/groups_api.rb', line 838 def post_group_members_with_http_info(group_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: GroupsApi.post_group_members ..." end # verify the required parameter 'group_id' is set fail ArgumentError, "Missing the required parameter 'group_id' when calling GroupsApi.post_group_members" if group_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling GroupsApi.post_group_members" if body.nil? # resource path local_var_path = "/api/v2/groups/{groupId}/members".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 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 => 'Empty') if @api_client.config.debugging @api_client.config.logger.debug "API called: GroupsApi#post_group_members\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#post_groups(body, opts = {}) ⇒ Group
Create a group
901 902 903 904 |
# File 'lib/purecloudplatformclientv2/api/groups_api.rb', line 901 def post_groups(body, opts = {}) data, _status_code, _headers = post_groups_with_http_info(body, opts) return data end |
#post_groups_search(body, opts = {}) ⇒ GroupsSearchResponse
Search groups
966 967 968 969 |
# File 'lib/purecloudplatformclientv2/api/groups_api.rb', line 966 def post_groups_search(body, opts = {}) data, _status_code, _headers = post_groups_search_with_http_info(body, opts) return data end |
#post_groups_search_with_http_info(body, opts = {}) ⇒ Array<(GroupsSearchResponse, Fixnum, Hash)>
Search groups
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 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 |
# File 'lib/purecloudplatformclientv2/api/groups_api.rb', line 976 def post_groups_search_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: GroupsApi.post_groups_search ..." end # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling GroupsApi.post_groups_search" if body.nil? # resource path local_var_path = "/api/v2/groups/search".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 => 'GroupsSearchResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: GroupsApi#post_groups_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#post_groups_with_http_info(body, opts = {}) ⇒ Array<(Group, Fixnum, Hash)>
Create a group
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 947 948 949 950 951 952 953 954 955 956 957 958 959 |
# File 'lib/purecloudplatformclientv2/api/groups_api.rb', line 911 def post_groups_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: GroupsApi.post_groups ..." end # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling GroupsApi.post_groups" if body.nil? # resource path local_var_path = "/api/v2/groups".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 => 'Group') if @api_client.config.debugging @api_client.config.logger.debug "API called: GroupsApi#post_groups\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#put_group(group_id, opts = {}) ⇒ Group
Update group
1032 1033 1034 1035 |
# File 'lib/purecloudplatformclientv2/api/groups_api.rb', line 1032 def put_group(group_id, opts = {}) data, _status_code, _headers = put_group_with_http_info(group_id, opts) return data end |
#put_group_with_http_info(group_id, opts = {}) ⇒ Array<(Group, Fixnum, Hash)>
Update group
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 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 |
# File 'lib/purecloudplatformclientv2/api/groups_api.rb', line 1043 def put_group_with_http_info(group_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: GroupsApi.put_group ..." end # verify the required parameter 'group_id' is set fail ArgumentError, "Missing the required parameter 'group_id' when calling GroupsApi.put_group" if group_id.nil? # resource path local_var_path = "/api/v2/groups/{groupId}".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(opts[:'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 => 'Group') if @api_client.config.debugging @api_client.config.logger.debug "API called: GroupsApi#put_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |