Class: PureCloud::UsersApi
- Inherits:
-
Object
- Object
- PureCloud::UsersApi
- Defined in:
- lib/purecloud/api/users_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create(opts = {}) ⇒ User
Create a configuration service user.
-
#create_with_http_info(opts = {}) ⇒ Array<(User, Fixnum, Hash)>
Create a configuration service user.
-
#get(opts = {}) ⇒ UsersEntityListing
Get the list of available users.
-
#get_me(opts = {}) ⇒ User
Get user.
-
#get_me_with_http_info(opts = {}) ⇒ Array<(User, Fixnum, Hash)>
Get user.
-
#get_user(user_id, opts = {}) ⇒ User
Get user.
-
#get_user_callforwarding(user_id, opts = {}) ⇒ CallForwarding
Get a user's CallForwarding.
-
#get_user_callforwarding_with_http_info(user_id, opts = {}) ⇒ Array<(CallForwarding, Fixnum, Hash)>
Get a user's CallForwarding.
-
#get_user_geolocations_by_client_id(user_id, client_id, opts = {}) ⇒ Geolocation
Get a user's Geolocation.
-
#get_user_geolocations_by_client_id_with_http_info(user_id, client_id, opts = {}) ⇒ Array<(Geolocation, Fixnum, Hash)>
Get a user's Geolocation.
-
#get_user_outofoffice(user_id, opts = {}) ⇒ OutOfOffice
Get a OutOfOffice.
-
#get_user_outofoffice_with_http_info(user_id, opts = {}) ⇒ Array<(OutOfOffice, Fixnum, Hash)>
Get a OutOfOffice.
-
#get_user_primarypresencesource(user_id, opts = {}) ⇒ PrimaryUserPresenceSource
Get a user's PrimaryUserPresenceSource.
-
#get_user_primarypresencesource_with_http_info(user_id, opts = {}) ⇒ Array<(PrimaryUserPresenceSource, Fixnum, Hash)>
Get a user's PrimaryUserPresenceSource.
-
#get_user_queues(user_id, opts = {}) ⇒ UserQueueEntityListing
Get queues for user.
-
#get_user_queues_with_http_info(user_id, opts = {}) ⇒ Array<(UserQueueEntityListing, Fixnum, Hash)>
Get queues for user.
-
#get_user_roles(user_id, opts = {}) ⇒ Array<DomainOrganizationRole>
List roles for user.
-
#get_user_roles_with_http_info(user_id, opts = {}) ⇒ Array<(Array<DomainOrganizationRole>, Fixnum, Hash)>
List roles for user.
-
#get_user_routingstatus(user_id, opts = {}) ⇒ RoutingStatus
Fetch the routing status of a user.
-
#get_user_routingstatus_with_http_info(user_id, opts = {}) ⇒ Array<(RoutingStatus, Fixnum, Hash)>
Fetch the routing status of a user.
-
#get_user_skills(user_id, opts = {}) ⇒ UserSkillEntityListing
List skills for user.
-
#get_user_skills_with_http_info(user_id, opts = {}) ⇒ Array<(UserSkillEntityListing, Fixnum, Hash)>
List skills for user.
-
#get_user_with_http_info(user_id, opts = {}) ⇒ Array<(User, Fixnum, Hash)>
Get user.
-
#get_with_http_info(opts = {}) ⇒ Array<(UsersEntityListing, Fixnum, Hash)>
Get the list of available users.
-
#initialize(api_client = ApiClient.default) ⇒ UsersApi
constructor
A new instance of UsersApi.
-
#patch_user_callforwarding(user_id, opts = {}) ⇒ CallForwarding
Patch a user's CallForwarding.
-
#patch_user_callforwarding_with_http_info(user_id, opts = {}) ⇒ Array<(CallForwarding, Fixnum, Hash)>
Patch a user's CallForwarding.
-
#patch_user_geolocations_by_client_id(user_id, client_id, opts = {}) ⇒ Geolocation
Patch a user's Geolocation The geolocation object can be patched one of three ways.
-
#patch_user_geolocations_by_client_id_with_http_info(user_id, client_id, opts = {}) ⇒ Array<(Geolocation, Fixnum, Hash)>
Patch a user's Geolocation The geolocation object can be patched one of three ways.
-
#patch_user_queues(user_id, opts = {}) ⇒ UserQueue
Join or unjoin a set of queues for a user.
-
#patch_user_queues_by_queue_id(queue_id, user_id, opts = {}) ⇒ UserQueue
Join or unjoin a queue for a user.
-
#patch_user_queues_by_queue_id_with_http_info(queue_id, user_id, opts = {}) ⇒ Array<(UserQueue, Fixnum, Hash)>
Join or unjoin a queue for a user.
-
#patch_user_queues_with_http_info(user_id, opts = {}) ⇒ Array<(UserQueue, Fixnum, Hash)>
Join or unjoin a set of queues for a user.
-
#update_user(user_id, body, opts = {}) ⇒ User
Set user station.
-
#update_user_callforwarding(user_id, opts = {}) ⇒ CallForwarding
Update a user's CallForwarding.
-
#update_user_callforwarding_with_http_info(user_id, opts = {}) ⇒ Array<(CallForwarding, Fixnum, Hash)>
Update a user's CallForwarding.
-
#update_user_outofoffice(user_id, body, opts = {}) ⇒ OutOfOffice
Update an OutOfOffice.
-
#update_user_outofoffice_with_http_info(user_id, body, opts = {}) ⇒ Array<(OutOfOffice, Fixnum, Hash)>
Update an OutOfOffice.
-
#update_user_primarypresencesource(user_id, opts = {}) ⇒ PrimaryUserPresenceSource
Update a user's PrimaryUserPresenceSource.
-
#update_user_primarypresencesource_with_http_info(user_id, opts = {}) ⇒ Array<(PrimaryUserPresenceSource, Fixnum, Hash)>
Update a user's PrimaryUserPresenceSource.
-
#update_user_routingstatus(user_id, opts = {}) ⇒ RoutingStatus
Update the routing status of a user.
-
#update_user_routingstatus_with_http_info(user_id, opts = {}) ⇒ Array<(RoutingStatus, Fixnum, Hash)>
Update the routing status of a user.
-
#update_user_with_http_info(user_id, body, opts = {}) ⇒ Array<(User, Fixnum, Hash)>
Set user station.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ UsersApi
Returns a new instance of UsersApi.
7 8 9 |
# File 'lib/purecloud/api/users_api.rb', line 7 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
5 6 7 |
# File 'lib/purecloud/api/users_api.rb', line 5 def api_client @api_client end |
Instance Method Details
#create(opts = {}) ⇒ User
Create a configuration service user.
99 100 101 102 |
# File 'lib/purecloud/api/users_api.rb', line 99 def create(opts = {}) data, status_code, headers = create_with_http_info(opts) return data end |
#create_with_http_info(opts = {}) ⇒ Array<(User, Fixnum, Hash)>
Create a configuration service user.
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 |
# File 'lib/purecloud/api/users_api.rb', line 109 def create_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi#create ..." end # resource path path = "/api/v1/users".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:POST, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'User') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get(opts = {}) ⇒ UsersEntityListing
Get the list of available users.
24 25 26 27 |
# File 'lib/purecloud/api/users_api.rb', line 24 def get(opts = {}) data, status_code, headers = get_with_http_info(opts) return data end |
#get_me(opts = {}) ⇒ User
Get user.
157 158 159 160 |
# File 'lib/purecloud/api/users_api.rb', line 157 def get_me(opts = {}) data, status_code, headers = get_me_with_http_info(opts) return data end |
#get_me_with_http_info(opts = {}) ⇒ Array<(User, Fixnum, Hash)>
Get user.
167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 |
# File 'lib/purecloud/api/users_api.rb', line 167 def get_me_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi#get_me ..." end # resource path path = "/api/v1/users/me".sub('{format}','json') # query parameters query_params = {} query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:GET, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'User') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_me\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_user(user_id, opts = {}) ⇒ User
Get user.
217 218 219 220 |
# File 'lib/purecloud/api/users_api.rb', line 217 def get_user(user_id, opts = {}) data, status_code, headers = get_user_with_http_info(user_id, opts) return data end |
#get_user_callforwarding(user_id, opts = {}) ⇒ CallForwarding
Get a user's CallForwarding
346 347 348 349 |
# File 'lib/purecloud/api/users_api.rb', line 346 def get_user_callforwarding(user_id, opts = {}) data, status_code, headers = get_user_callforwarding_with_http_info(user_id, opts) return data end |
#get_user_callforwarding_with_http_info(user_id, opts = {}) ⇒ Array<(CallForwarding, Fixnum, Hash)>
Get a user's CallForwarding
356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 |
# File 'lib/purecloud/api/users_api.rb', line 356 def get_user_callforwarding_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi#get_user_callforwarding ..." end # verify the required parameter 'user_id' is set fail "Missing the required parameter 'user_id' when calling get_user_callforwarding" if user_id.nil? # resource path path = "/api/v1/users/{userId}/callforwarding".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:GET, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'CallForwarding') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_user_callforwarding\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_user_geolocations_by_client_id(user_id, client_id, opts = {}) ⇒ Geolocation
Get a user's Geolocation
534 535 536 537 |
# File 'lib/purecloud/api/users_api.rb', line 534 def get_user_geolocations_by_client_id(user_id, client_id, opts = {}) data, status_code, headers = get_user_geolocations_by_client_id_with_http_info(user_id, client_id, opts) return data end |
#get_user_geolocations_by_client_id_with_http_info(user_id, client_id, opts = {}) ⇒ Array<(Geolocation, Fixnum, Hash)>
Get a user's Geolocation
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 592 |
# File 'lib/purecloud/api/users_api.rb', line 545 def get_user_geolocations_by_client_id_with_http_info(user_id, client_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi#get_user_geolocations_by_client_id ..." end # verify the required parameter 'user_id' is set fail "Missing the required parameter 'user_id' when calling get_user_geolocations_by_client_id" if user_id.nil? # verify the required parameter 'client_id' is set fail "Missing the required parameter 'client_id' when calling get_user_geolocations_by_client_id" if client_id.nil? # resource path path = "/api/v1/users/{userId}/geolocations/{clientId}".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s).sub('{' + 'clientId' + '}', client_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:GET, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Geolocation') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_user_geolocations_by_client_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_user_outofoffice(user_id, opts = {}) ⇒ OutOfOffice
Get a OutOfOffice
667 668 669 670 |
# File 'lib/purecloud/api/users_api.rb', line 667 def get_user_outofoffice(user_id, opts = {}) data, status_code, headers = get_user_outofoffice_with_http_info(user_id, opts) return data end |
#get_user_outofoffice_with_http_info(user_id, opts = {}) ⇒ Array<(OutOfOffice, Fixnum, Hash)>
Get a OutOfOffice
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/purecloud/api/users_api.rb', line 677 def get_user_outofoffice_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi#get_user_outofoffice ..." end # verify the required parameter 'user_id' is set fail "Missing the required parameter 'user_id' when calling get_user_outofoffice" if user_id.nil? # resource path path = "/api/v1/users/{userId}/outofoffice".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:GET, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'OutOfOffice') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_user_outofoffice\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_user_primarypresencesource(user_id, opts = {}) ⇒ PrimaryUserPresenceSource
Get a user's PrimaryUserPresenceSource
794 795 796 797 |
# File 'lib/purecloud/api/users_api.rb', line 794 def get_user_primarypresencesource(user_id, opts = {}) data, status_code, headers = get_user_primarypresencesource_with_http_info(user_id, opts) return data end |
#get_user_primarypresencesource_with_http_info(user_id, opts = {}) ⇒ Array<(PrimaryUserPresenceSource, Fixnum, Hash)>
Get a user's PrimaryUserPresenceSource
804 805 806 807 808 809 810 811 812 813 814 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 |
# File 'lib/purecloud/api/users_api.rb', line 804 def get_user_primarypresencesource_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi#get_user_primarypresencesource ..." end # verify the required parameter 'user_id' is set fail "Missing the required parameter 'user_id' when calling get_user_primarypresencesource" if user_id.nil? # resource path path = "/api/v1/users/{userId}/primarypresencesource".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:GET, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'PrimaryUserPresenceSource') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_user_primarypresencesource\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_user_queues(user_id, opts = {}) ⇒ UserQueueEntityListing
Get queues for user
920 921 922 923 |
# File 'lib/purecloud/api/users_api.rb', line 920 def get_user_queues(user_id, opts = {}) data, status_code, headers = get_user_queues_with_http_info(user_id, opts) return data end |
#get_user_queues_with_http_info(user_id, opts = {}) ⇒ Array<(UserQueueEntityListing, Fixnum, Hash)>
Get queues for user
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 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 |
# File 'lib/purecloud/api/users_api.rb', line 932 def get_user_queues_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi#get_user_queues ..." end # verify the required parameter 'user_id' is set fail "Missing the required parameter 'user_id' when calling get_user_queues" if user_id.nil? # resource path path = "/api/v1/users/{userId}/queues".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) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:GET, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'UserQueueEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_user_queues\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_user_roles(user_id, opts = {}) ⇒ Array<DomainOrganizationRole>
List roles for user
1116 1117 1118 1119 |
# File 'lib/purecloud/api/users_api.rb', line 1116 def get_user_roles(user_id, opts = {}) data, status_code, headers = get_user_roles_with_http_info(user_id, opts) return data end |
#get_user_roles_with_http_info(user_id, opts = {}) ⇒ Array<(Array<DomainOrganizationRole>, Fixnum, Hash)>
List roles for user
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 1162 1163 1164 1165 1166 1167 1168 1169 1170 |
# File 'lib/purecloud/api/users_api.rb', line 1126 def get_user_roles_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi#get_user_roles ..." end # verify the required parameter 'user_id' is set fail "Missing the required parameter 'user_id' when calling get_user_roles" if user_id.nil? # resource path path = "/api/v1/users/{userId}/roles".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:GET, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Array<DomainOrganizationRole>') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_user_roles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_user_routingstatus(user_id, opts = {}) ⇒ RoutingStatus
Fetch the routing status of a user
1177 1178 1179 1180 |
# File 'lib/purecloud/api/users_api.rb', line 1177 def get_user_routingstatus(user_id, opts = {}) data, status_code, headers = get_user_routingstatus_with_http_info(user_id, opts) return data end |
#get_user_routingstatus_with_http_info(user_id, opts = {}) ⇒ Array<(RoutingStatus, Fixnum, Hash)>
Fetch the routing status of a user
1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 |
# File 'lib/purecloud/api/users_api.rb', line 1187 def get_user_routingstatus_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi#get_user_routingstatus ..." end # verify the required parameter 'user_id' is set fail "Missing the required parameter 'user_id' when calling get_user_routingstatus" if user_id.nil? # resource path path = "/api/v1/users/{userId}/routingstatus".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:GET, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'RoutingStatus') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_user_routingstatus\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_user_skills(user_id, opts = {}) ⇒ UserSkillEntityListing
List skills for user
1301 1302 1303 1304 |
# File 'lib/purecloud/api/users_api.rb', line 1301 def get_user_skills(user_id, opts = {}) data, status_code, headers = get_user_skills_with_http_info(user_id, opts) return data end |
#get_user_skills_with_http_info(user_id, opts = {}) ⇒ Array<(UserSkillEntityListing, Fixnum, Hash)>
List skills for user
1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 |
# File 'lib/purecloud/api/users_api.rb', line 1311 def get_user_skills_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi#get_user_skills ..." end # verify the required parameter 'user_id' is set fail "Missing the required parameter 'user_id' when calling get_user_skills" if user_id.nil? # resource path path = "/api/v1/users/{userId}/skills".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:GET, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'UserSkillEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_user_skills\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_user_with_http_info(user_id, opts = {}) ⇒ Array<(User, Fixnum, Hash)>
Get user.
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 |
# File 'lib/purecloud/api/users_api.rb', line 228 def get_user_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi#get_user ..." end # verify the required parameter 'user_id' is set fail "Missing the required parameter 'user_id' when calling get_user" if user_id.nil? # resource path path = "/api/v1/users/{userId}".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:GET, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'User') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_with_http_info(opts = {}) ⇒ Array<(UsersEntityListing, Fixnum, Hash)>
Get the list of available users.
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 90 91 92 |
# File 'lib/purecloud/api/users_api.rb', line 42 def get_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi#get ..." end # resource path path = "/api/v1/users".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[:'sortBy'] = opts[:'sort_by'] if opts[:'sort_by'] query_params[:'role'] = opts[:'role'] if opts[:'role'] query_params[:'name'] = opts[:'name'] if opts[:'name'] query_params[:'username'] = opts[:'username'] if opts[:'username'] query_params[:'skill'] = @api_client.build_collection_param(opts[:'skill'], :multi) if opts[:'skill'] query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:GET, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'UsersEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#patch_user_callforwarding(user_id, opts = {}) ⇒ CallForwarding
Patch a user's CallForwarding
471 472 473 474 |
# File 'lib/purecloud/api/users_api.rb', line 471 def patch_user_callforwarding(user_id, opts = {}) data, status_code, headers = patch_user_callforwarding_with_http_info(user_id, opts) return data end |
#patch_user_callforwarding_with_http_info(user_id, opts = {}) ⇒ Array<(CallForwarding, Fixnum, Hash)>
Patch a user's CallForwarding
482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 |
# File 'lib/purecloud/api/users_api.rb', line 482 def patch_user_callforwarding_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi#patch_user_callforwarding ..." end # verify the required parameter 'user_id' is set fail "Missing the required parameter 'user_id' when calling patch_user_callforwarding" if user_id.nil? # resource path path = "/api/v1/users/{userId}/callforwarding".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:PATCH, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'CallForwarding') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#patch_user_callforwarding\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#patch_user_geolocations_by_client_id(user_id, client_id, opts = {}) ⇒ Geolocation
Patch a user's Geolocation The geolocation object can be patched one of three ways. Option 1: Set the 'primary' property to true. This will set the client as the user's primary geolocation source. Option 2: Provide the 'latitude' and 'longitude' values. This will enqueue an asynchronous update of the 'city', 'region', and 'country', generating a notification. A subsequent GET operation will include the new values for 'city', 'region' and 'country'. Option 3: Provide the 'city', 'region', 'country' values. Option 1 can be combined with Option 2 or Option 3. For example, update the client as primary and provide latitude and longitude values.
601 602 603 604 |
# File 'lib/purecloud/api/users_api.rb', line 601 def patch_user_geolocations_by_client_id(user_id, client_id, opts = {}) data, status_code, headers = patch_user_geolocations_by_client_id_with_http_info(user_id, client_id, opts) return data end |
#patch_user_geolocations_by_client_id_with_http_info(user_id, client_id, opts = {}) ⇒ Array<(Geolocation, Fixnum, Hash)>
Patch a user's Geolocation The geolocation object can be patched one of three ways. Option 1: Set the 'primary' property to true. This will set the client as the user's primary geolocation source. Option 2: Provide the 'latitude' and 'longitude' values. This will enqueue an asynchronous update of the 'city', 'region', and 'country', generating a notification. A subsequent GET operation will include the new values for 'city', 'region' and 'country'. Option 3: Provide the 'city', 'region', 'country' values. Option 1 can be combined with Option 2 or Option 3. For example, update the client as primary and provide latitude and longitude values.
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 657 658 659 660 |
# File 'lib/purecloud/api/users_api.rb', line 613 def patch_user_geolocations_by_client_id_with_http_info(user_id, client_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi#patch_user_geolocations_by_client_id ..." end # verify the required parameter 'user_id' is set fail "Missing the required parameter 'user_id' when calling patch_user_geolocations_by_client_id" if user_id.nil? # verify the required parameter 'client_id' is set fail "Missing the required parameter 'client_id' when calling patch_user_geolocations_by_client_id" if client_id.nil? # resource path path = "/api/v1/users/{userId}/geolocations/{clientId}".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s).sub('{' + 'clientId' + '}', client_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:PATCH, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Geolocation') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#patch_user_geolocations_by_client_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#patch_user_queues(user_id, opts = {}) ⇒ UserQueue
Join or unjoin a set of queues for a user
986 987 988 989 |
# File 'lib/purecloud/api/users_api.rb', line 986 def patch_user_queues(user_id, opts = {}) data, status_code, headers = patch_user_queues_with_http_info(user_id, opts) return data end |
#patch_user_queues_by_queue_id(queue_id, user_id, opts = {}) ⇒ UserQueue
Join or unjoin a queue for a user
1050 1051 1052 1053 |
# File 'lib/purecloud/api/users_api.rb', line 1050 def patch_user_queues_by_queue_id(queue_id, user_id, opts = {}) data, status_code, headers = patch_user_queues_by_queue_id_with_http_info(queue_id, user_id, opts) return data end |
#patch_user_queues_by_queue_id_with_http_info(queue_id, user_id, opts = {}) ⇒ Array<(UserQueue, Fixnum, Hash)>
Join or unjoin a queue for a user
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 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 |
# File 'lib/purecloud/api/users_api.rb', line 1062 def patch_user_queues_by_queue_id_with_http_info(queue_id, user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi#patch_user_queues_by_queue_id ..." end # verify the required parameter 'queue_id' is set fail "Missing the required parameter 'queue_id' when calling patch_user_queues_by_queue_id" if queue_id.nil? # verify the required parameter 'user_id' is set fail "Missing the required parameter 'user_id' when calling patch_user_queues_by_queue_id" if user_id.nil? # resource path path = "/api/v1/users/{userId}/queues/{queueId}".sub('{format}','json').sub('{' + 'queueId' + '}', queue_id.to_s).sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:PATCH, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'UserQueue') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#patch_user_queues_by_queue_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#patch_user_queues_with_http_info(user_id, opts = {}) ⇒ Array<(UserQueue, Fixnum, Hash)>
Join or unjoin a set of queues for a user
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 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 |
# File 'lib/purecloud/api/users_api.rb', line 997 def patch_user_queues_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi#patch_user_queues ..." end # verify the required parameter 'user_id' is set fail "Missing the required parameter 'user_id' when calling patch_user_queues" if user_id.nil? # resource path path = "/api/v1/users/{userId}/queues".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:PATCH, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'UserQueue') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#patch_user_queues\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_user(user_id, body, opts = {}) ⇒ User
Set user station
281 282 283 284 |
# File 'lib/purecloud/api/users_api.rb', line 281 def update_user(user_id, body, opts = {}) data, status_code, headers = update_user_with_http_info(user_id, body, opts) return data end |
#update_user_callforwarding(user_id, opts = {}) ⇒ CallForwarding
Update a user's CallForwarding
408 409 410 411 |
# File 'lib/purecloud/api/users_api.rb', line 408 def update_user_callforwarding(user_id, opts = {}) data, status_code, headers = update_user_callforwarding_with_http_info(user_id, opts) return data end |
#update_user_callforwarding_with_http_info(user_id, opts = {}) ⇒ Array<(CallForwarding, Fixnum, Hash)>
Update a user's CallForwarding
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 |
# File 'lib/purecloud/api/users_api.rb', line 419 def update_user_callforwarding_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi#update_user_callforwarding ..." end # verify the required parameter 'user_id' is set fail "Missing the required parameter 'user_id' when calling update_user_callforwarding" if user_id.nil? # resource path path = "/api/v1/users/{userId}/callforwarding".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:PUT, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'CallForwarding') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#update_user_callforwarding\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_user_outofoffice(user_id, body, opts = {}) ⇒ OutOfOffice
Update an OutOfOffice
729 730 731 732 |
# File 'lib/purecloud/api/users_api.rb', line 729 def update_user_outofoffice(user_id, body, opts = {}) data, status_code, headers = update_user_outofoffice_with_http_info(user_id, body, opts) return data end |
#update_user_outofoffice_with_http_info(user_id, body, opts = {}) ⇒ Array<(OutOfOffice, Fixnum, Hash)>
Update an OutOfOffice
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 |
# File 'lib/purecloud/api/users_api.rb', line 740 def update_user_outofoffice_with_http_info(user_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi#update_user_outofoffice ..." end # verify the required parameter 'user_id' is set fail "Missing the required parameter 'user_id' when calling update_user_outofoffice" if user_id.nil? # verify the required parameter 'body' is set fail "Missing the required parameter 'body' when calling update_user_outofoffice" if body.nil? # resource path path = "/api/v1/users/{userId}/outofoffice".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:PUT, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'OutOfOffice') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#update_user_outofoffice\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_user_primarypresencesource(user_id, opts = {}) ⇒ PrimaryUserPresenceSource
Update a user's PrimaryUserPresenceSource
856 857 858 859 |
# File 'lib/purecloud/api/users_api.rb', line 856 def update_user_primarypresencesource(user_id, opts = {}) data, status_code, headers = update_user_primarypresencesource_with_http_info(user_id, opts) return data end |
#update_user_primarypresencesource_with_http_info(user_id, opts = {}) ⇒ Array<(PrimaryUserPresenceSource, Fixnum, Hash)>
Update a user's PrimaryUserPresenceSource
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 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 |
# File 'lib/purecloud/api/users_api.rb', line 867 def update_user_primarypresencesource_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi#update_user_primarypresencesource ..." end # verify the required parameter 'user_id' is set fail "Missing the required parameter 'user_id' when calling update_user_primarypresencesource" if user_id.nil? # resource path path = "/api/v1/users/{userId}/primarypresencesource".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:PUT, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'PrimaryUserPresenceSource') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#update_user_primarypresencesource\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_user_routingstatus(user_id, opts = {}) ⇒ RoutingStatus
Update the routing status of a user
1239 1240 1241 1242 |
# File 'lib/purecloud/api/users_api.rb', line 1239 def update_user_routingstatus(user_id, opts = {}) data, status_code, headers = update_user_routingstatus_with_http_info(user_id, opts) return data end |
#update_user_routingstatus_with_http_info(user_id, opts = {}) ⇒ Array<(RoutingStatus, Fixnum, Hash)>
Update the routing status of a user
1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 |
# File 'lib/purecloud/api/users_api.rb', line 1250 def update_user_routingstatus_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi#update_user_routingstatus ..." end # verify the required parameter 'user_id' is set fail "Missing the required parameter 'user_id' when calling update_user_routingstatus" if user_id.nil? # resource path path = "/api/v1/users/{userId}/routingstatus".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:PUT, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'RoutingStatus') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#update_user_routingstatus\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_user_with_http_info(user_id, body, opts = {}) ⇒ Array<(User, Fixnum, Hash)>
Set user station
292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 |
# File 'lib/purecloud/api/users_api.rb', line 292 def update_user_with_http_info(user_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi#update_user ..." end # verify the required parameter 'user_id' is set fail "Missing the required parameter 'user_id' when calling update_user" if user_id.nil? # verify the required parameter 'body' is set fail "Missing the required parameter 'body' when calling update_user" if body.nil? # resource path path = "/api/v1/users/{userId}".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:PUT, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'User') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#update_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |