purecloud 0.37.1 → 0.38.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/config-ruby.json +1 -1
- data/doc_out/AuthorizationApi.html.md +57 -0
- data/doc_out/AuthzGrant.html.md +15 -0
- data/doc_out/AuthzGrantPolicy.html.md +16 -0
- data/doc_out/AuthzGrantRole.html.md +17 -0
- data/doc_out/AuthzObject.html.md +17 -0
- data/doc_out/AuthzPermissionContext.html.md +14 -0
- data/doc_out/AuthzSubject.html.md +16 -0
- data/doc_out/CreateUser.html.md +0 -1
- data/doc_out/ExportUri.html.md +14 -0
- data/doc_out/FaxSendRequest.html.md +5 -5
- data/doc_out/GroupsApi.html.md +119 -0
- data/doc_out/JsonNode.html.md +2 -2
- data/doc_out/Location.html.md +20 -0
- data/doc_out/LocationAddress.html.md +19 -0
- data/doc_out/LocationEmergencyNumber.html.md +15 -0
- data/doc_out/LocationsApi.html.md +249 -0
- data/doc_out/ObjectsApi.html.md +69 -0
- data/doc_out/OrganizationCreate.html.md +5 -5
- data/doc_out/OutboundApi.html.md +122 -0
- data/doc_out/SearchApi.html.md +254 -12
- data/doc_out/SuggestApi.html.md +254 -0
- data/doc_out/User.html.md +1 -1
- data/doc_out/UserMe.html.md +1 -1
- data/doc_out/UserPresence.html.md +1 -0
- data/doc_out/index.html.md +3 -3
- data/lib/purecloud.rb +13 -1
- data/lib/purecloud/api/authorization_api.rb +60 -0
- data/lib/purecloud/api/groups_api.rb +126 -0
- data/lib/purecloud/api/locations_api.rb +273 -0
- data/lib/purecloud/api/objects_api.rb +87 -0
- data/lib/purecloud/api/outbound_api.rb +126 -0
- data/lib/purecloud/api/search_api.rb +259 -14
- data/lib/purecloud/api/suggest_api.rb +272 -0
- data/lib/purecloud/api_client.rb +1 -1
- data/lib/purecloud/models/authz_grant.rb +186 -0
- data/lib/purecloud/models/authz_grant_policy.rb +197 -0
- data/lib/purecloud/models/authz_grant_role.rb +209 -0
- data/lib/purecloud/models/authz_object.rb +210 -0
- data/lib/purecloud/models/authz_permission_context.rb +175 -0
- data/lib/purecloud/models/authz_subject.rb +199 -0
- data/lib/purecloud/models/callback.rb +1 -1
- data/lib/purecloud/models/create_user.rb +4 -15
- data/lib/purecloud/models/export_uri.rb +176 -0
- data/lib/purecloud/models/fax_send_request.rb +21 -7
- data/lib/purecloud/models/group.rb +1 -1
- data/lib/purecloud/models/json_node.rb +25 -25
- data/lib/purecloud/models/location.rb +249 -0
- data/lib/purecloud/models/location_address.rb +225 -0
- data/lib/purecloud/models/location_emergency_number.rb +195 -0
- data/lib/purecloud/models/organization_create.rb +5 -5
- data/lib/purecloud/models/search_criteria.rb +1 -1
- data/lib/purecloud/models/user.rb +1 -1
- data/lib/purecloud/models/user_me.rb +1 -1
- data/lib/purecloud/models/user_presence.rb +12 -1
- data/lib/purecloud/version.rb +1 -1
- data/newVersion.md +1 -1
- data/swagger.json +1 -1
- data/version.json +1 -1
- metadata +28 -4
- data/doc_out/ExternalContactsApi.html.md +0 -1594
- data/lib/purecloud/api/external_contacts_api.rb +0 -1679
data/doc_out/User.html.md
CHANGED
@@ -18,7 +18,7 @@ title: User
|
|
18
18
|
| **title** | **String** | | [optional] |
|
19
19
|
| **username** | **String** | | [optional] |
|
20
20
|
| **images** | [**Array<UserImage>**](UserImage.html) | | [optional] |
|
21
|
-
| **version** | **
|
21
|
+
| **version** | **Integer** | Required when updating. Version must be the current version. Only the system can assign version. | [optional] |
|
22
22
|
| **routing_status** | [**RoutingStatus**](RoutingStatus.html) | ACD routing status | [optional] |
|
23
23
|
| **presence** | [**UserPresence**](UserPresence.html) | Active presence | [optional] |
|
24
24
|
| **conversation_summary** | [**UserConversationSummary**](UserConversationSummary.html) | Summary of conversion statistics for conversation types. | [optional] |
|
data/doc_out/UserMe.html.md
CHANGED
@@ -18,7 +18,7 @@ title: UserMe
|
|
18
18
|
| **title** | **String** | | [optional] |
|
19
19
|
| **username** | **String** | | [optional] |
|
20
20
|
| **images** | [**Array<UserImage>**](UserImage.html) | | [optional] |
|
21
|
-
| **version** | **
|
21
|
+
| **version** | **Integer** | Required when updating. Version must be the current version. Only the system can assign version. | [optional] |
|
22
22
|
| **routing_status** | [**RoutingStatus**](RoutingStatus.html) | ACD routing status | [optional] |
|
23
23
|
| **presence** | [**UserPresence**](UserPresence.html) | Active presence | [optional] |
|
24
24
|
| **conversation_summary** | [**UserConversationSummary**](UserConversationSummary.html) | Summary of conversion statistics for conversation types. | [optional] |
|
@@ -13,6 +13,7 @@ title: UserPresence
|
|
13
13
|
| **primary** | **BOOLEAN** | A boolean used to tell whether or not to set this presence source as the primary on a PATCH | [optional] [default to false]|
|
14
14
|
| **presence_definition** | [**OrganizationPresence**](OrganizationPresence.html) | | [optional] |
|
15
15
|
| **message** | **String** | | [optional] |
|
16
|
+
| **modified_date** | **DateTime** | Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ | [optional] |
|
16
17
|
| **self_uri** | **String** | The URI for this object | [optional] |
|
17
18
|
{: class="table table-striped"}
|
18
19
|
|
data/doc_out/index.html.md
CHANGED
@@ -9,8 +9,8 @@ With the PureCloud Platform API, you can control all aspects of your PureCloud e
|
|
9
9
|
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
10
10
|
|
11
11
|
- API version: v2
|
12
|
-
- Package version: 0.
|
13
|
-
- Build date: 2016-
|
12
|
+
- Package version: 0.38.1
|
13
|
+
- Build date: 2016-05-01T03:13:46.334Z
|
14
14
|
|
15
15
|
For more information, please visit [https://developer.mypurecloud.com](https://developer.mypurecloud.com)
|
16
16
|
|
@@ -18,7 +18,7 @@ For more information, please visit [https://developer.mypurecloud.com](https://d
|
|
18
18
|
|
19
19
|
### from rubygems.org
|
20
20
|
|
21
|
-
gem 'purecloud', '~> 0.
|
21
|
+
gem 'purecloud', '~> 0.38.1'
|
22
22
|
|
23
23
|
### Install from Git
|
24
24
|
|
data/lib/purecloud.rb
CHANGED
@@ -70,6 +70,12 @@ require 'purecloud/models/audit_filter'
|
|
70
70
|
require 'purecloud/models/audit_message'
|
71
71
|
require 'purecloud/models/audit_search_result'
|
72
72
|
require 'purecloud/models/audit_user'
|
73
|
+
require 'purecloud/models/authz_grant'
|
74
|
+
require 'purecloud/models/authz_grant_policy'
|
75
|
+
require 'purecloud/models/authz_grant_role'
|
76
|
+
require 'purecloud/models/authz_object'
|
77
|
+
require 'purecloud/models/authz_permission_context'
|
78
|
+
require 'purecloud/models/authz_subject'
|
73
79
|
require 'purecloud/models/available_additional_service'
|
74
80
|
require 'purecloud/models/available_additional_service_listing'
|
75
81
|
require 'purecloud/models/available_topic'
|
@@ -303,6 +309,7 @@ require 'purecloud/models/evaluation_scoring_set'
|
|
303
309
|
require 'purecloud/models/evaluator_activity'
|
304
310
|
require 'purecloud/models/evaluator_activity_entity_listing'
|
305
311
|
require 'purecloud/models/expansion_criterium'
|
312
|
+
require 'purecloud/models/export_uri'
|
306
313
|
require 'purecloud/models/expression_response'
|
307
314
|
require 'purecloud/models/extension'
|
308
315
|
require 'purecloud/models/extension_entity_listing'
|
@@ -402,6 +409,9 @@ require 'purecloud/models/line_entity_listing'
|
|
402
409
|
require 'purecloud/models/line_status'
|
403
410
|
require 'purecloud/models/linked_entity_listing_flow_details'
|
404
411
|
require 'purecloud/models/linked_entity_listing_work_item_search_details'
|
412
|
+
require 'purecloud/models/location'
|
413
|
+
require 'purecloud/models/location_address'
|
414
|
+
require 'purecloud/models/location_emergency_number'
|
405
415
|
require 'purecloud/models/lock_info'
|
406
416
|
require 'purecloud/models/logical_interface_entity_listing'
|
407
417
|
require 'purecloud/models/management_unit'
|
@@ -716,14 +726,15 @@ require 'purecloud/api/authorization_api'
|
|
716
726
|
require 'purecloud/api/configuration_api'
|
717
727
|
require 'purecloud/api/content_management_api'
|
718
728
|
require 'purecloud/api/conversations_api'
|
719
|
-
require 'purecloud/api/external_contacts_api'
|
720
729
|
require 'purecloud/api/fax_api'
|
721
730
|
require 'purecloud/api/geolocation_api'
|
722
731
|
require 'purecloud/api/greetings_api'
|
723
732
|
require 'purecloud/api/groups_api'
|
724
733
|
require 'purecloud/api/languages_api'
|
734
|
+
require 'purecloud/api/locations_api'
|
725
735
|
require 'purecloud/api/notifications_api'
|
726
736
|
require 'purecloud/api/o_auth_api'
|
737
|
+
require 'purecloud/api/objects_api'
|
727
738
|
require 'purecloud/api/organization_api'
|
728
739
|
require 'purecloud/api/outbound_api'
|
729
740
|
require 'purecloud/api/presence_api'
|
@@ -733,6 +744,7 @@ require 'purecloud/api/response_management_api'
|
|
733
744
|
require 'purecloud/api/routing_api'
|
734
745
|
require 'purecloud/api/search_api'
|
735
746
|
require 'purecloud/api/stations_api'
|
747
|
+
require 'purecloud/api/suggest_api'
|
736
748
|
require 'purecloud/api/telephony_providers_edge_api'
|
737
749
|
require 'purecloud/api/tokens_api'
|
738
750
|
require 'purecloud/api/user_recordings_api'
|
@@ -142,6 +142,66 @@ module PureCloud
|
|
142
142
|
return data, status_code, headers
|
143
143
|
end
|
144
144
|
|
145
|
+
# Returns a permission-protected object, showing the permission contexts it belongs to.
|
146
|
+
#
|
147
|
+
# @param object_id Object ID
|
148
|
+
# @param [Hash] opts the optional parameters
|
149
|
+
# @return [AuthzObject]
|
150
|
+
def get_objects_object_id(object_id, opts = {})
|
151
|
+
data, status_code, headers = get_objects_object_id_with_http_info(object_id, opts)
|
152
|
+
return data
|
153
|
+
end
|
154
|
+
|
155
|
+
# Returns a permission-protected object, showing the permission contexts it belongs to.
|
156
|
+
#
|
157
|
+
# @param object_id Object ID
|
158
|
+
# @param [Hash] opts the optional parameters
|
159
|
+
# @return [Array<(AuthzObject, Fixnum, Hash)>] AuthzObject data, response status code and response headers
|
160
|
+
def get_objects_object_id_with_http_info(object_id, opts = {})
|
161
|
+
if @api_client.config.debugging
|
162
|
+
@api_client.config.logger.debug "Calling API: AuthorizationApi#get_objects_object_id ..."
|
163
|
+
end
|
164
|
+
|
165
|
+
# verify the required parameter 'object_id' is set
|
166
|
+
fail "Missing the required parameter 'object_id' when calling get_objects_object_id" if object_id.nil?
|
167
|
+
|
168
|
+
# resource path
|
169
|
+
local_var_path = "/api/v2/authorization/objects/{objectId}".sub('{format}','json').sub('{' + 'objectId' + '}', object_id.to_s)
|
170
|
+
|
171
|
+
# query parameters
|
172
|
+
query_params = {}
|
173
|
+
|
174
|
+
# header parameters
|
175
|
+
header_params = {}
|
176
|
+
|
177
|
+
# HTTP header 'Accept' (if needed)
|
178
|
+
_header_accept = ['application/json']
|
179
|
+
_header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
180
|
+
|
181
|
+
# HTTP header 'Content-Type'
|
182
|
+
_header_content_type = ['application/json']
|
183
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
|
184
|
+
|
185
|
+
# form parameters
|
186
|
+
form_params = {}
|
187
|
+
|
188
|
+
# http body (model)
|
189
|
+
post_body = nil
|
190
|
+
|
191
|
+
auth_names = ['PureCloud Auth']
|
192
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
193
|
+
:header_params => header_params,
|
194
|
+
:query_params => query_params,
|
195
|
+
:form_params => form_params,
|
196
|
+
:body => post_body,
|
197
|
+
:auth_names => auth_names,
|
198
|
+
:return_type => 'AuthzObject')
|
199
|
+
if @api_client.config.debugging
|
200
|
+
@api_client.config.logger.debug "API called: AuthorizationApi#get_objects_object_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
201
|
+
end
|
202
|
+
return data, status_code, headers
|
203
|
+
end
|
204
|
+
|
145
205
|
# Get all permissions.
|
146
206
|
# Retrieve a list of all permission defined in the system.
|
147
207
|
# @param [Hash] opts the optional parameters
|
@@ -24,6 +24,71 @@ module PureCloud
|
|
24
24
|
@api_client = api_client
|
25
25
|
end
|
26
26
|
|
27
|
+
# Remove members
|
28
|
+
#
|
29
|
+
# @param group_id Group ID
|
30
|
+
# @param ids Comma separated list of userIds to remove
|
31
|
+
# @param [Hash] opts the optional parameters
|
32
|
+
# @return [nil]
|
33
|
+
def delete_group_id_members(group_id, ids, opts = {})
|
34
|
+
delete_group_id_members_with_http_info(group_id, ids, opts)
|
35
|
+
return nil
|
36
|
+
end
|
37
|
+
|
38
|
+
# Remove members
|
39
|
+
#
|
40
|
+
# @param group_id Group ID
|
41
|
+
# @param ids Comma separated list of userIds to remove
|
42
|
+
# @param [Hash] opts the optional parameters
|
43
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
44
|
+
def delete_group_id_members_with_http_info(group_id, ids, opts = {})
|
45
|
+
if @api_client.config.debugging
|
46
|
+
@api_client.config.logger.debug "Calling API: GroupsApi#delete_group_id_members ..."
|
47
|
+
end
|
48
|
+
|
49
|
+
# verify the required parameter 'group_id' is set
|
50
|
+
fail "Missing the required parameter 'group_id' when calling delete_group_id_members" if group_id.nil?
|
51
|
+
|
52
|
+
# verify the required parameter 'ids' is set
|
53
|
+
fail "Missing the required parameter 'ids' when calling delete_group_id_members" if ids.nil?
|
54
|
+
|
55
|
+
# resource path
|
56
|
+
local_var_path = "/api/v2/groups/{groupId}/members".sub('{format}','json').sub('{' + 'groupId' + '}', group_id.to_s)
|
57
|
+
|
58
|
+
# query parameters
|
59
|
+
query_params = {}
|
60
|
+
query_params[:'ids'] = ids
|
61
|
+
|
62
|
+
# header parameters
|
63
|
+
header_params = {}
|
64
|
+
|
65
|
+
# HTTP header 'Accept' (if needed)
|
66
|
+
_header_accept = ['application/json']
|
67
|
+
_header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
68
|
+
|
69
|
+
# HTTP header 'Content-Type'
|
70
|
+
_header_content_type = ['application/json']
|
71
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
|
72
|
+
|
73
|
+
# form parameters
|
74
|
+
form_params = {}
|
75
|
+
|
76
|
+
# http body (model)
|
77
|
+
post_body = nil
|
78
|
+
|
79
|
+
auth_names = ['PureCloud Auth']
|
80
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
81
|
+
:header_params => header_params,
|
82
|
+
:query_params => query_params,
|
83
|
+
:form_params => form_params,
|
84
|
+
:body => post_body,
|
85
|
+
:auth_names => auth_names)
|
86
|
+
if @api_client.config.debugging
|
87
|
+
@api_client.config.logger.debug "API called: GroupsApi#delete_group_id_members\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
88
|
+
end
|
89
|
+
return data, status_code, headers
|
90
|
+
end
|
91
|
+
|
27
92
|
# Get group
|
28
93
|
#
|
29
94
|
# @param group_id Group ID
|
@@ -286,6 +351,67 @@ module PureCloud
|
|
286
351
|
return data, status_code, headers
|
287
352
|
end
|
288
353
|
|
354
|
+
# Add members
|
355
|
+
#
|
356
|
+
# @param group_id Group ID
|
357
|
+
# @param [Hash] opts the optional parameters
|
358
|
+
# @option opts [GroupMembersUpdate] :body Add members
|
359
|
+
# @return [nil]
|
360
|
+
def post_group_id_members(group_id, opts = {})
|
361
|
+
post_group_id_members_with_http_info(group_id, opts)
|
362
|
+
return nil
|
363
|
+
end
|
364
|
+
|
365
|
+
# Add members
|
366
|
+
#
|
367
|
+
# @param group_id Group ID
|
368
|
+
# @param [Hash] opts the optional parameters
|
369
|
+
# @option opts [GroupMembersUpdate] :body Add members
|
370
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
371
|
+
def post_group_id_members_with_http_info(group_id, opts = {})
|
372
|
+
if @api_client.config.debugging
|
373
|
+
@api_client.config.logger.debug "Calling API: GroupsApi#post_group_id_members ..."
|
374
|
+
end
|
375
|
+
|
376
|
+
# verify the required parameter 'group_id' is set
|
377
|
+
fail "Missing the required parameter 'group_id' when calling post_group_id_members" if group_id.nil?
|
378
|
+
|
379
|
+
# resource path
|
380
|
+
local_var_path = "/api/v2/groups/{groupId}/members".sub('{format}','json').sub('{' + 'groupId' + '}', group_id.to_s)
|
381
|
+
|
382
|
+
# query parameters
|
383
|
+
query_params = {}
|
384
|
+
|
385
|
+
# header parameters
|
386
|
+
header_params = {}
|
387
|
+
|
388
|
+
# HTTP header 'Accept' (if needed)
|
389
|
+
_header_accept = ['application/json']
|
390
|
+
_header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
391
|
+
|
392
|
+
# HTTP header 'Content-Type'
|
393
|
+
_header_content_type = ['application/json']
|
394
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
|
395
|
+
|
396
|
+
# form parameters
|
397
|
+
form_params = {}
|
398
|
+
|
399
|
+
# http body (model)
|
400
|
+
post_body = @api_client.object_to_http_body(opts[:'body'])
|
401
|
+
|
402
|
+
auth_names = ['PureCloud Auth']
|
403
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
404
|
+
:header_params => header_params,
|
405
|
+
:query_params => query_params,
|
406
|
+
:form_params => form_params,
|
407
|
+
:body => post_body,
|
408
|
+
:auth_names => auth_names)
|
409
|
+
if @api_client.config.debugging
|
410
|
+
@api_client.config.logger.debug "API called: GroupsApi#post_group_id_members\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
411
|
+
end
|
412
|
+
return data, status_code, headers
|
413
|
+
end
|
414
|
+
|
289
415
|
# Create a group
|
290
416
|
#
|
291
417
|
# @param [Hash] opts the optional parameters
|
@@ -0,0 +1,273 @@
|
|
1
|
+
=begin
|
2
|
+
PureCloud Platform API
|
3
|
+
|
4
|
+
With the PureCloud Platform API, you can control all aspects of your PureCloud environment. With the APIs you can access the system configuration, manage conversations and more.
|
5
|
+
|
6
|
+
OpenAPI spec version: v2
|
7
|
+
Contact: DeveloperEvangelists@inin.com
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
|
10
|
+
License: ININ
|
11
|
+
http://www.inin.com
|
12
|
+
|
13
|
+
Terms of Service: https://developer.mypurecloud.com/tos
|
14
|
+
|
15
|
+
=end
|
16
|
+
|
17
|
+
require "uri"
|
18
|
+
|
19
|
+
module PureCloud
|
20
|
+
class LocationsApi
|
21
|
+
attr_accessor :api_client
|
22
|
+
|
23
|
+
def initialize(api_client = ApiClient.default)
|
24
|
+
@api_client = api_client
|
25
|
+
end
|
26
|
+
|
27
|
+
# Get Location by ID.
|
28
|
+
#
|
29
|
+
# @param location_id Location ID
|
30
|
+
# @param [Hash] opts the optional parameters
|
31
|
+
# @return [Location]
|
32
|
+
def get_location_id(location_id, opts = {})
|
33
|
+
data, status_code, headers = get_location_id_with_http_info(location_id, opts)
|
34
|
+
return data
|
35
|
+
end
|
36
|
+
|
37
|
+
# Get Location by ID.
|
38
|
+
#
|
39
|
+
# @param location_id Location ID
|
40
|
+
# @param [Hash] opts the optional parameters
|
41
|
+
# @return [Array<(Location, Fixnum, Hash)>] Location data, response status code and response headers
|
42
|
+
def get_location_id_with_http_info(location_id, opts = {})
|
43
|
+
if @api_client.config.debugging
|
44
|
+
@api_client.config.logger.debug "Calling API: LocationsApi#get_location_id ..."
|
45
|
+
end
|
46
|
+
|
47
|
+
# verify the required parameter 'location_id' is set
|
48
|
+
fail "Missing the required parameter 'location_id' when calling get_location_id" if location_id.nil?
|
49
|
+
|
50
|
+
# resource path
|
51
|
+
local_var_path = "/api/v2/locations/{locationId}".sub('{format}','json').sub('{' + 'locationId' + '}', location_id.to_s)
|
52
|
+
|
53
|
+
# query parameters
|
54
|
+
query_params = {}
|
55
|
+
|
56
|
+
# header parameters
|
57
|
+
header_params = {}
|
58
|
+
|
59
|
+
# HTTP header 'Accept' (if needed)
|
60
|
+
_header_accept = ['application/json']
|
61
|
+
_header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
62
|
+
|
63
|
+
# HTTP header 'Content-Type'
|
64
|
+
_header_content_type = ['application/json']
|
65
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
|
66
|
+
|
67
|
+
# form parameters
|
68
|
+
form_params = {}
|
69
|
+
|
70
|
+
# http body (model)
|
71
|
+
post_body = nil
|
72
|
+
|
73
|
+
auth_names = ['PureCloud Auth']
|
74
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
75
|
+
:header_params => header_params,
|
76
|
+
:query_params => query_params,
|
77
|
+
:form_params => form_params,
|
78
|
+
:body => post_body,
|
79
|
+
:auth_names => auth_names,
|
80
|
+
:return_type => 'Location')
|
81
|
+
if @api_client.config.debugging
|
82
|
+
@api_client.config.logger.debug "API called: LocationsApi#get_location_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
83
|
+
end
|
84
|
+
return data, status_code, headers
|
85
|
+
end
|
86
|
+
|
87
|
+
# Get a list of all locations.
|
88
|
+
#
|
89
|
+
# @param [Hash] opts the optional parameters
|
90
|
+
# @option opts [Integer] :page_size Page size (default to 25)
|
91
|
+
# @option opts [Integer] :page_number Page number (default to 1)
|
92
|
+
# @option opts [String] :sort_order Sort order
|
93
|
+
# @return [Array<Location>]
|
94
|
+
def get_locations(opts = {})
|
95
|
+
data, status_code, headers = get_locations_with_http_info(opts)
|
96
|
+
return data
|
97
|
+
end
|
98
|
+
|
99
|
+
# Get a list of all locations.
|
100
|
+
#
|
101
|
+
# @param [Hash] opts the optional parameters
|
102
|
+
# @option opts [Integer] :page_size Page size
|
103
|
+
# @option opts [Integer] :page_number Page number
|
104
|
+
# @option opts [String] :sort_order Sort order
|
105
|
+
# @return [Array<(Array<Location>, Fixnum, Hash)>] Array<Location> data, response status code and response headers
|
106
|
+
def get_locations_with_http_info(opts = {})
|
107
|
+
if @api_client.config.debugging
|
108
|
+
@api_client.config.logger.debug "Calling API: LocationsApi#get_locations ..."
|
109
|
+
end
|
110
|
+
|
111
|
+
if opts[:'sort_order'] && !['asc', 'desc'].include?(opts[:'sort_order'])
|
112
|
+
fail 'invalid value for "sort_order", must be one of asc, desc'
|
113
|
+
end
|
114
|
+
|
115
|
+
# resource path
|
116
|
+
local_var_path = "/api/v2/locations".sub('{format}','json')
|
117
|
+
|
118
|
+
# query parameters
|
119
|
+
query_params = {}
|
120
|
+
query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size']
|
121
|
+
query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number']
|
122
|
+
query_params[:'sortOrder'] = opts[:'sort_order'] if opts[:'sort_order']
|
123
|
+
|
124
|
+
# header parameters
|
125
|
+
header_params = {}
|
126
|
+
|
127
|
+
# HTTP header 'Accept' (if needed)
|
128
|
+
_header_accept = ['application/json']
|
129
|
+
_header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
130
|
+
|
131
|
+
# HTTP header 'Content-Type'
|
132
|
+
_header_content_type = ['application/json']
|
133
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
|
134
|
+
|
135
|
+
# form parameters
|
136
|
+
form_params = {}
|
137
|
+
|
138
|
+
# http body (model)
|
139
|
+
post_body = nil
|
140
|
+
|
141
|
+
auth_names = ['PureCloud Auth']
|
142
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
143
|
+
:header_params => header_params,
|
144
|
+
:query_params => query_params,
|
145
|
+
:form_params => form_params,
|
146
|
+
:body => post_body,
|
147
|
+
:auth_names => auth_names,
|
148
|
+
:return_type => 'Array<Location>')
|
149
|
+
if @api_client.config.debugging
|
150
|
+
@api_client.config.logger.debug "API called: LocationsApi#get_locations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
151
|
+
end
|
152
|
+
return data, status_code, headers
|
153
|
+
end
|
154
|
+
|
155
|
+
# Search using q64
|
156
|
+
#
|
157
|
+
# @param [Hash] opts the optional parameters
|
158
|
+
# @option opts [String] :q64
|
159
|
+
# @option opts [Array<String>] :expand
|
160
|
+
# @return [GroupsSearchResponse]
|
161
|
+
def get_search(opts = {})
|
162
|
+
data, status_code, headers = get_search_with_http_info(opts)
|
163
|
+
return data
|
164
|
+
end
|
165
|
+
|
166
|
+
# Search using q64
|
167
|
+
#
|
168
|
+
# @param [Hash] opts the optional parameters
|
169
|
+
# @option opts [String] :q64
|
170
|
+
# @option opts [Array<String>] :expand
|
171
|
+
# @return [Array<(GroupsSearchResponse, Fixnum, Hash)>] GroupsSearchResponse data, response status code and response headers
|
172
|
+
def get_search_with_http_info(opts = {})
|
173
|
+
if @api_client.config.debugging
|
174
|
+
@api_client.config.logger.debug "Calling API: LocationsApi#get_search ..."
|
175
|
+
end
|
176
|
+
|
177
|
+
# resource path
|
178
|
+
local_var_path = "/api/v2/locations/search".sub('{format}','json')
|
179
|
+
|
180
|
+
# query parameters
|
181
|
+
query_params = {}
|
182
|
+
query_params[:'q64'] = opts[:'q64'] if opts[:'q64']
|
183
|
+
query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand']
|
184
|
+
|
185
|
+
# header parameters
|
186
|
+
header_params = {}
|
187
|
+
|
188
|
+
# HTTP header 'Accept' (if needed)
|
189
|
+
_header_accept = ['application/json']
|
190
|
+
_header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
191
|
+
|
192
|
+
# HTTP header 'Content-Type'
|
193
|
+
_header_content_type = ['application/json']
|
194
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
|
195
|
+
|
196
|
+
# form parameters
|
197
|
+
form_params = {}
|
198
|
+
|
199
|
+
# http body (model)
|
200
|
+
post_body = nil
|
201
|
+
|
202
|
+
auth_names = ['PureCloud Auth']
|
203
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
204
|
+
:header_params => header_params,
|
205
|
+
:query_params => query_params,
|
206
|
+
:form_params => form_params,
|
207
|
+
:body => post_body,
|
208
|
+
:auth_names => auth_names,
|
209
|
+
:return_type => 'GroupsSearchResponse')
|
210
|
+
if @api_client.config.debugging
|
211
|
+
@api_client.config.logger.debug "API called: LocationsApi#get_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
212
|
+
end
|
213
|
+
return data, status_code, headers
|
214
|
+
end
|
215
|
+
|
216
|
+
# Search
|
217
|
+
#
|
218
|
+
# @param [Hash] opts the optional parameters
|
219
|
+
# @option opts [SearchRequest] :body Search request options
|
220
|
+
# @return [GroupsSearchResponse]
|
221
|
+
def post_search(opts = {})
|
222
|
+
data, status_code, headers = post_search_with_http_info(opts)
|
223
|
+
return data
|
224
|
+
end
|
225
|
+
|
226
|
+
# Search
|
227
|
+
#
|
228
|
+
# @param [Hash] opts the optional parameters
|
229
|
+
# @option opts [SearchRequest] :body Search request options
|
230
|
+
# @return [Array<(GroupsSearchResponse, Fixnum, Hash)>] GroupsSearchResponse data, response status code and response headers
|
231
|
+
def post_search_with_http_info(opts = {})
|
232
|
+
if @api_client.config.debugging
|
233
|
+
@api_client.config.logger.debug "Calling API: LocationsApi#post_search ..."
|
234
|
+
end
|
235
|
+
|
236
|
+
# resource path
|
237
|
+
local_var_path = "/api/v2/locations/search".sub('{format}','json')
|
238
|
+
|
239
|
+
# query parameters
|
240
|
+
query_params = {}
|
241
|
+
|
242
|
+
# header parameters
|
243
|
+
header_params = {}
|
244
|
+
|
245
|
+
# HTTP header 'Accept' (if needed)
|
246
|
+
_header_accept = ['application/json']
|
247
|
+
_header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
248
|
+
|
249
|
+
# HTTP header 'Content-Type'
|
250
|
+
_header_content_type = ['application/json']
|
251
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
|
252
|
+
|
253
|
+
# form parameters
|
254
|
+
form_params = {}
|
255
|
+
|
256
|
+
# http body (model)
|
257
|
+
post_body = @api_client.object_to_http_body(opts[:'body'])
|
258
|
+
|
259
|
+
auth_names = ['PureCloud Auth']
|
260
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
261
|
+
:header_params => header_params,
|
262
|
+
:query_params => query_params,
|
263
|
+
:form_params => form_params,
|
264
|
+
:body => post_body,
|
265
|
+
:auth_names => auth_names,
|
266
|
+
:return_type => 'GroupsSearchResponse')
|
267
|
+
if @api_client.config.debugging
|
268
|
+
@api_client.config.logger.debug "API called: LocationsApi#post_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
269
|
+
end
|
270
|
+
return data, status_code, headers
|
271
|
+
end
|
272
|
+
end
|
273
|
+
end
|