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.
Files changed (64) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -3
  3. data/config-ruby.json +1 -1
  4. data/doc_out/AuthorizationApi.html.md +57 -0
  5. data/doc_out/AuthzGrant.html.md +15 -0
  6. data/doc_out/AuthzGrantPolicy.html.md +16 -0
  7. data/doc_out/AuthzGrantRole.html.md +17 -0
  8. data/doc_out/AuthzObject.html.md +17 -0
  9. data/doc_out/AuthzPermissionContext.html.md +14 -0
  10. data/doc_out/AuthzSubject.html.md +16 -0
  11. data/doc_out/CreateUser.html.md +0 -1
  12. data/doc_out/ExportUri.html.md +14 -0
  13. data/doc_out/FaxSendRequest.html.md +5 -5
  14. data/doc_out/GroupsApi.html.md +119 -0
  15. data/doc_out/JsonNode.html.md +2 -2
  16. data/doc_out/Location.html.md +20 -0
  17. data/doc_out/LocationAddress.html.md +19 -0
  18. data/doc_out/LocationEmergencyNumber.html.md +15 -0
  19. data/doc_out/LocationsApi.html.md +249 -0
  20. data/doc_out/ObjectsApi.html.md +69 -0
  21. data/doc_out/OrganizationCreate.html.md +5 -5
  22. data/doc_out/OutboundApi.html.md +122 -0
  23. data/doc_out/SearchApi.html.md +254 -12
  24. data/doc_out/SuggestApi.html.md +254 -0
  25. data/doc_out/User.html.md +1 -1
  26. data/doc_out/UserMe.html.md +1 -1
  27. data/doc_out/UserPresence.html.md +1 -0
  28. data/doc_out/index.html.md +3 -3
  29. data/lib/purecloud.rb +13 -1
  30. data/lib/purecloud/api/authorization_api.rb +60 -0
  31. data/lib/purecloud/api/groups_api.rb +126 -0
  32. data/lib/purecloud/api/locations_api.rb +273 -0
  33. data/lib/purecloud/api/objects_api.rb +87 -0
  34. data/lib/purecloud/api/outbound_api.rb +126 -0
  35. data/lib/purecloud/api/search_api.rb +259 -14
  36. data/lib/purecloud/api/suggest_api.rb +272 -0
  37. data/lib/purecloud/api_client.rb +1 -1
  38. data/lib/purecloud/models/authz_grant.rb +186 -0
  39. data/lib/purecloud/models/authz_grant_policy.rb +197 -0
  40. data/lib/purecloud/models/authz_grant_role.rb +209 -0
  41. data/lib/purecloud/models/authz_object.rb +210 -0
  42. data/lib/purecloud/models/authz_permission_context.rb +175 -0
  43. data/lib/purecloud/models/authz_subject.rb +199 -0
  44. data/lib/purecloud/models/callback.rb +1 -1
  45. data/lib/purecloud/models/create_user.rb +4 -15
  46. data/lib/purecloud/models/export_uri.rb +176 -0
  47. data/lib/purecloud/models/fax_send_request.rb +21 -7
  48. data/lib/purecloud/models/group.rb +1 -1
  49. data/lib/purecloud/models/json_node.rb +25 -25
  50. data/lib/purecloud/models/location.rb +249 -0
  51. data/lib/purecloud/models/location_address.rb +225 -0
  52. data/lib/purecloud/models/location_emergency_number.rb +195 -0
  53. data/lib/purecloud/models/organization_create.rb +5 -5
  54. data/lib/purecloud/models/search_criteria.rb +1 -1
  55. data/lib/purecloud/models/user.rb +1 -1
  56. data/lib/purecloud/models/user_me.rb +1 -1
  57. data/lib/purecloud/models/user_presence.rb +12 -1
  58. data/lib/purecloud/version.rb +1 -1
  59. data/newVersion.md +1 -1
  60. data/swagger.json +1 -1
  61. data/version.json +1 -1
  62. metadata +28 -4
  63. data/doc_out/ExternalContactsApi.html.md +0 -1594
  64. data/lib/purecloud/api/external_contacts_api.rb +0 -1679
@@ -1,1679 +0,0 @@
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 ExternalContactsApi
21
- attr_accessor :api_client
22
-
23
- def initialize(api_client = ApiClient.default)
24
- @api_client = api_client
25
- end
26
-
27
- # Delete a contact
28
- #
29
- # @param contact_id ExternalContact ID
30
- # @param [Hash] opts the optional parameters
31
- # @return [nil]
32
- def delete_contacts_contact_id(contact_id, opts = {})
33
- delete_contacts_contact_id_with_http_info(contact_id, opts)
34
- return nil
35
- end
36
-
37
- # Delete a contact
38
- #
39
- # @param contact_id ExternalContact ID
40
- # @param [Hash] opts the optional parameters
41
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
42
- def delete_contacts_contact_id_with_http_info(contact_id, opts = {})
43
- if @api_client.config.debugging
44
- @api_client.config.logger.debug "Calling API: ExternalContactsApi#delete_contacts_contact_id ..."
45
- end
46
-
47
- # verify the required parameter 'contact_id' is set
48
- fail "Missing the required parameter 'contact_id' when calling delete_contacts_contact_id" if contact_id.nil?
49
-
50
- # resource path
51
- local_var_path = "/api/v2/externalcontacts/contacts/{contactId}".sub('{format}','json').sub('{' + 'contactId' + '}', contact_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(:DELETE, 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
- if @api_client.config.debugging
81
- @api_client.config.logger.debug "API called: ExternalContactsApi#delete_contacts_contact_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
82
- end
83
- return data, status_code, headers
84
- end
85
-
86
- # Delete a note for a contact
87
- #
88
- # @param contact_id ExternalContact Id
89
- # @param note_id Note Id
90
- # @param [Hash] opts the optional parameters
91
- # @return [nil]
92
- def delete_contacts_contact_id_notes_note_id(contact_id, note_id, opts = {})
93
- delete_contacts_contact_id_notes_note_id_with_http_info(contact_id, note_id, opts)
94
- return nil
95
- end
96
-
97
- # Delete a note for a contact
98
- #
99
- # @param contact_id ExternalContact Id
100
- # @param note_id Note Id
101
- # @param [Hash] opts the optional parameters
102
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
103
- def delete_contacts_contact_id_notes_note_id_with_http_info(contact_id, note_id, opts = {})
104
- if @api_client.config.debugging
105
- @api_client.config.logger.debug "Calling API: ExternalContactsApi#delete_contacts_contact_id_notes_note_id ..."
106
- end
107
-
108
- # verify the required parameter 'contact_id' is set
109
- fail "Missing the required parameter 'contact_id' when calling delete_contacts_contact_id_notes_note_id" if contact_id.nil?
110
-
111
- # verify the required parameter 'note_id' is set
112
- fail "Missing the required parameter 'note_id' when calling delete_contacts_contact_id_notes_note_id" if note_id.nil?
113
-
114
- # resource path
115
- local_var_path = "/api/v2/externalcontacts/contacts/{contactId}/notes/{noteId}".sub('{format}','json').sub('{' + 'contactId' + '}', contact_id.to_s).sub('{' + 'noteId' + '}', note_id.to_s)
116
-
117
- # query parameters
118
- query_params = {}
119
-
120
- # header parameters
121
- header_params = {}
122
-
123
- # HTTP header 'Accept' (if needed)
124
- _header_accept = ['application/json']
125
- _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
126
-
127
- # HTTP header 'Content-Type'
128
- _header_content_type = ['application/json']
129
- header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
130
-
131
- # form parameters
132
- form_params = {}
133
-
134
- # http body (model)
135
- post_body = nil
136
-
137
- auth_names = ['PureCloud Auth']
138
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
139
- :header_params => header_params,
140
- :query_params => query_params,
141
- :form_params => form_params,
142
- :body => post_body,
143
- :auth_names => auth_names)
144
- if @api_client.config.debugging
145
- @api_client.config.logger.debug "API called: ExternalContactsApi#delete_contacts_contact_id_notes_note_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
146
- end
147
- return data, status_code, headers
148
- end
149
-
150
- # Delete an External Organization
151
- #
152
- # @param external_organization_id External Organization ID
153
- # @param [Hash] opts the optional parameters
154
- # @return [nil]
155
- def delete_organizations_externalorganization_id(external_organization_id, opts = {})
156
- delete_organizations_externalorganization_id_with_http_info(external_organization_id, opts)
157
- return nil
158
- end
159
-
160
- # Delete an External Organization
161
- #
162
- # @param external_organization_id External Organization ID
163
- # @param [Hash] opts the optional parameters
164
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
165
- def delete_organizations_externalorganization_id_with_http_info(external_organization_id, opts = {})
166
- if @api_client.config.debugging
167
- @api_client.config.logger.debug "Calling API: ExternalContactsApi#delete_organizations_externalorganization_id ..."
168
- end
169
-
170
- # verify the required parameter 'external_organization_id' is set
171
- fail "Missing the required parameter 'external_organization_id' when calling delete_organizations_externalorganization_id" if external_organization_id.nil?
172
-
173
- # resource path
174
- local_var_path = "/api/v2/externalcontacts/organizations/{externalOrganizationId}".sub('{format}','json').sub('{' + 'externalOrganizationId' + '}', external_organization_id.to_s)
175
-
176
- # query parameters
177
- query_params = {}
178
-
179
- # header parameters
180
- header_params = {}
181
-
182
- # HTTP header 'Accept' (if needed)
183
- _header_accept = ['application/json']
184
- _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
185
-
186
- # HTTP header 'Content-Type'
187
- _header_content_type = ['application/json']
188
- header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
189
-
190
- # form parameters
191
- form_params = {}
192
-
193
- # http body (model)
194
- post_body = nil
195
-
196
- auth_names = ['PureCloud Auth']
197
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
198
- :header_params => header_params,
199
- :query_params => query_params,
200
- :form_params => form_params,
201
- :body => post_body,
202
- :auth_names => auth_names)
203
- if @api_client.config.debugging
204
- @api_client.config.logger.debug "API called: ExternalContactsApi#delete_organizations_externalorganization_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
205
- end
206
- return data, status_code, headers
207
- end
208
-
209
- # Delete a note
210
- #
211
- # @param external_organization_id External Organization Id
212
- # @param note_id Note Id
213
- # @param [Hash] opts the optional parameters
214
- # @return [nil]
215
- def delete_organizations_externalorganization_id_notes_note_id(external_organization_id, note_id, opts = {})
216
- delete_organizations_externalorganization_id_notes_note_id_with_http_info(external_organization_id, note_id, opts)
217
- return nil
218
- end
219
-
220
- # Delete a note
221
- #
222
- # @param external_organization_id External Organization Id
223
- # @param note_id Note Id
224
- # @param [Hash] opts the optional parameters
225
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
226
- def delete_organizations_externalorganization_id_notes_note_id_with_http_info(external_organization_id, note_id, opts = {})
227
- if @api_client.config.debugging
228
- @api_client.config.logger.debug "Calling API: ExternalContactsApi#delete_organizations_externalorganization_id_notes_note_id ..."
229
- end
230
-
231
- # verify the required parameter 'external_organization_id' is set
232
- fail "Missing the required parameter 'external_organization_id' when calling delete_organizations_externalorganization_id_notes_note_id" if external_organization_id.nil?
233
-
234
- # verify the required parameter 'note_id' is set
235
- fail "Missing the required parameter 'note_id' when calling delete_organizations_externalorganization_id_notes_note_id" if note_id.nil?
236
-
237
- # resource path
238
- local_var_path = "/api/v2/externalcontacts/organizations/{externalOrganizationId}/notes/{noteId}".sub('{format}','json').sub('{' + 'externalOrganizationId' + '}', external_organization_id.to_s).sub('{' + 'noteId' + '}', note_id.to_s)
239
-
240
- # query parameters
241
- query_params = {}
242
-
243
- # header parameters
244
- header_params = {}
245
-
246
- # HTTP header 'Accept' (if needed)
247
- _header_accept = ['application/json']
248
- _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
249
-
250
- # HTTP header 'Content-Type'
251
- _header_content_type = ['application/json']
252
- header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
253
-
254
- # form parameters
255
- form_params = {}
256
-
257
- # http body (model)
258
- post_body = nil
259
-
260
- auth_names = ['PureCloud Auth']
261
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
262
- :header_params => header_params,
263
- :query_params => query_params,
264
- :form_params => form_params,
265
- :body => post_body,
266
- :auth_names => auth_names)
267
- if @api_client.config.debugging
268
- @api_client.config.logger.debug "API called: ExternalContactsApi#delete_organizations_externalorganization_id_notes_note_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
269
- end
270
- return data, status_code, headers
271
- end
272
-
273
- # Delete a relationship
274
- #
275
- # @param relationship_id Relationship Id
276
- # @param [Hash] opts the optional parameters
277
- # @return [nil]
278
- def delete_relationships_relationship_id(relationship_id, opts = {})
279
- delete_relationships_relationship_id_with_http_info(relationship_id, opts)
280
- return nil
281
- end
282
-
283
- # Delete a relationship
284
- #
285
- # @param relationship_id Relationship Id
286
- # @param [Hash] opts the optional parameters
287
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
288
- def delete_relationships_relationship_id_with_http_info(relationship_id, opts = {})
289
- if @api_client.config.debugging
290
- @api_client.config.logger.debug "Calling API: ExternalContactsApi#delete_relationships_relationship_id ..."
291
- end
292
-
293
- # verify the required parameter 'relationship_id' is set
294
- fail "Missing the required parameter 'relationship_id' when calling delete_relationships_relationship_id" if relationship_id.nil?
295
-
296
- # resource path
297
- local_var_path = "/api/v2/externalcontacts/relationships/{relationshipId}".sub('{format}','json').sub('{' + 'relationshipId' + '}', relationship_id.to_s)
298
-
299
- # query parameters
300
- query_params = {}
301
-
302
- # header parameters
303
- header_params = {}
304
-
305
- # HTTP header 'Accept' (if needed)
306
- _header_accept = ['application/json']
307
- _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
308
-
309
- # HTTP header 'Content-Type'
310
- _header_content_type = ['application/json']
311
- header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
312
-
313
- # form parameters
314
- form_params = {}
315
-
316
- # http body (model)
317
- post_body = nil
318
-
319
- auth_names = ['PureCloud Auth']
320
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
321
- :header_params => header_params,
322
- :query_params => query_params,
323
- :form_params => form_params,
324
- :body => post_body,
325
- :auth_names => auth_names)
326
- if @api_client.config.debugging
327
- @api_client.config.logger.debug "API called: ExternalContactsApi#delete_relationships_relationship_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
328
- end
329
- return data, status_code, headers
330
- end
331
-
332
- # Search for External Contacts
333
- #
334
- # @param [Hash] opts the optional parameters
335
- # @option opts [Integer] :page_size Page size (default to 20)
336
- # @option opts [Integer] :page_number Page number (default to 1)
337
- # @option opts [String] :q User supplied search keywords (no special syntax is currently supported)
338
- # @option opts [String] :sort_order Sort order
339
- # @option opts [Array<String>] :expand which fields, if any, to expand
340
- # @return [ContactListing]
341
- def get_contacts(opts = {})
342
- data, status_code, headers = get_contacts_with_http_info(opts)
343
- return data
344
- end
345
-
346
- # Search for External Contacts
347
- #
348
- # @param [Hash] opts the optional parameters
349
- # @option opts [Integer] :page_size Page size
350
- # @option opts [Integer] :page_number Page number
351
- # @option opts [String] :q User supplied search keywords (no special syntax is currently supported)
352
- # @option opts [String] :sort_order Sort order
353
- # @option opts [Array<String>] :expand which fields, if any, to expand
354
- # @return [Array<(ContactListing, Fixnum, Hash)>] ContactListing data, response status code and response headers
355
- def get_contacts_with_http_info(opts = {})
356
- if @api_client.config.debugging
357
- @api_client.config.logger.debug "Calling API: ExternalContactsApi#get_contacts ..."
358
- end
359
-
360
- # resource path
361
- local_var_path = "/api/v2/externalcontacts/contacts".sub('{format}','json')
362
-
363
- # query parameters
364
- query_params = {}
365
- query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size']
366
- query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number']
367
- query_params[:'q'] = opts[:'q'] if opts[:'q']
368
- query_params[:'sortOrder'] = opts[:'sort_order'] if opts[:'sort_order']
369
- query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand']
370
-
371
- # header parameters
372
- header_params = {}
373
-
374
- # HTTP header 'Accept' (if needed)
375
- _header_accept = ['application/json']
376
- _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
377
-
378
- # HTTP header 'Content-Type'
379
- _header_content_type = ['application/json']
380
- header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
381
-
382
- # form parameters
383
- form_params = {}
384
-
385
- # http body (model)
386
- post_body = nil
387
-
388
- auth_names = ['PureCloud Auth']
389
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
390
- :header_params => header_params,
391
- :query_params => query_params,
392
- :form_params => form_params,
393
- :body => post_body,
394
- :auth_names => auth_names,
395
- :return_type => 'ContactListing')
396
- if @api_client.config.debugging
397
- @api_client.config.logger.debug "API called: ExternalContactsApi#get_contacts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
398
- end
399
- return data, status_code, headers
400
- end
401
-
402
- # Fetch a ExternalContact
403
- #
404
- # @param contact_id ExternalContact ID
405
- # @param [Hash] opts the optional parameters
406
- # @option opts [Array<String>] :expand which fields, if any, to expand
407
- # @return [ExternalContact]
408
- def get_contacts_contact_id(contact_id, opts = {})
409
- data, status_code, headers = get_contacts_contact_id_with_http_info(contact_id, opts)
410
- return data
411
- end
412
-
413
- # Fetch a ExternalContact
414
- #
415
- # @param contact_id ExternalContact ID
416
- # @param [Hash] opts the optional parameters
417
- # @option opts [Array<String>] :expand which fields, if any, to expand
418
- # @return [Array<(ExternalContact, Fixnum, Hash)>] ExternalContact data, response status code and response headers
419
- def get_contacts_contact_id_with_http_info(contact_id, opts = {})
420
- if @api_client.config.debugging
421
- @api_client.config.logger.debug "Calling API: ExternalContactsApi#get_contacts_contact_id ..."
422
- end
423
-
424
- # verify the required parameter 'contact_id' is set
425
- fail "Missing the required parameter 'contact_id' when calling get_contacts_contact_id" if contact_id.nil?
426
-
427
- # resource path
428
- local_var_path = "/api/v2/externalcontacts/contacts/{contactId}".sub('{format}','json').sub('{' + 'contactId' + '}', contact_id.to_s)
429
-
430
- # query parameters
431
- query_params = {}
432
- query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand']
433
-
434
- # header parameters
435
- header_params = {}
436
-
437
- # HTTP header 'Accept' (if needed)
438
- _header_accept = ['application/json']
439
- _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
440
-
441
- # HTTP header 'Content-Type'
442
- _header_content_type = ['application/json']
443
- header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
444
-
445
- # form parameters
446
- form_params = {}
447
-
448
- # http body (model)
449
- post_body = nil
450
-
451
- auth_names = ['PureCloud Auth']
452
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
453
- :header_params => header_params,
454
- :query_params => query_params,
455
- :form_params => form_params,
456
- :body => post_body,
457
- :auth_names => auth_names,
458
- :return_type => 'ExternalContact')
459
- if @api_client.config.debugging
460
- @api_client.config.logger.debug "API called: ExternalContactsApi#get_contacts_contact_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
461
- end
462
- return data, status_code, headers
463
- end
464
-
465
- # List Notes for an ExternalContact
466
- #
467
- # @param contact_id ExternalContact Id
468
- # @param [Hash] opts the optional parameters
469
- # @option opts [Integer] :page_size Page size (default to 20)
470
- # @option opts [Integer] :page_number Page number (default to 1)
471
- # @option opts [String] :sort_order Sort order
472
- # @return [NoteListing]
473
- def get_contacts_contact_id_notes(contact_id, opts = {})
474
- data, status_code, headers = get_contacts_contact_id_notes_with_http_info(contact_id, opts)
475
- return data
476
- end
477
-
478
- # List Notes for an ExternalContact
479
- #
480
- # @param contact_id ExternalContact Id
481
- # @param [Hash] opts the optional parameters
482
- # @option opts [Integer] :page_size Page size
483
- # @option opts [Integer] :page_number Page number
484
- # @option opts [String] :sort_order Sort order
485
- # @return [Array<(NoteListing, Fixnum, Hash)>] NoteListing data, response status code and response headers
486
- def get_contacts_contact_id_notes_with_http_info(contact_id, opts = {})
487
- if @api_client.config.debugging
488
- @api_client.config.logger.debug "Calling API: ExternalContactsApi#get_contacts_contact_id_notes ..."
489
- end
490
-
491
- # verify the required parameter 'contact_id' is set
492
- fail "Missing the required parameter 'contact_id' when calling get_contacts_contact_id_notes" if contact_id.nil?
493
-
494
- # resource path
495
- local_var_path = "/api/v2/externalcontacts/contacts/{contactId}/notes".sub('{format}','json').sub('{' + 'contactId' + '}', contact_id.to_s)
496
-
497
- # query parameters
498
- query_params = {}
499
- query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size']
500
- query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number']
501
- query_params[:'sortOrder'] = opts[:'sort_order'] if opts[:'sort_order']
502
-
503
- # header parameters
504
- header_params = {}
505
-
506
- # HTTP header 'Accept' (if needed)
507
- _header_accept = ['application/json']
508
- _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
509
-
510
- # HTTP header 'Content-Type'
511
- _header_content_type = ['application/json']
512
- header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
513
-
514
- # form parameters
515
- form_params = {}
516
-
517
- # http body (model)
518
- post_body = nil
519
-
520
- auth_names = ['PureCloud Auth']
521
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
522
- :header_params => header_params,
523
- :query_params => query_params,
524
- :form_params => form_params,
525
- :body => post_body,
526
- :auth_names => auth_names,
527
- :return_type => 'NoteListing')
528
- if @api_client.config.debugging
529
- @api_client.config.logger.debug "API called: ExternalContactsApi#get_contacts_contact_id_notes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
530
- end
531
- return data, status_code, headers
532
- end
533
-
534
- # Fetch a note for a contact
535
- #
536
- # @param contact_id ExternalContact Id
537
- # @param note_id Note Id
538
- # @param [Hash] opts the optional parameters
539
- # @return [Note]
540
- def get_contacts_contact_id_notes_note_id(contact_id, note_id, opts = {})
541
- data, status_code, headers = get_contacts_contact_id_notes_note_id_with_http_info(contact_id, note_id, opts)
542
- return data
543
- end
544
-
545
- # Fetch a note for a contact
546
- #
547
- # @param contact_id ExternalContact Id
548
- # @param note_id Note Id
549
- # @param [Hash] opts the optional parameters
550
- # @return [Array<(Note, Fixnum, Hash)>] Note data, response status code and response headers
551
- def get_contacts_contact_id_notes_note_id_with_http_info(contact_id, note_id, opts = {})
552
- if @api_client.config.debugging
553
- @api_client.config.logger.debug "Calling API: ExternalContactsApi#get_contacts_contact_id_notes_note_id ..."
554
- end
555
-
556
- # verify the required parameter 'contact_id' is set
557
- fail "Missing the required parameter 'contact_id' when calling get_contacts_contact_id_notes_note_id" if contact_id.nil?
558
-
559
- # verify the required parameter 'note_id' is set
560
- fail "Missing the required parameter 'note_id' when calling get_contacts_contact_id_notes_note_id" if note_id.nil?
561
-
562
- # resource path
563
- local_var_path = "/api/v2/externalcontacts/contacts/{contactId}/notes/{noteId}".sub('{format}','json').sub('{' + 'contactId' + '}', contact_id.to_s).sub('{' + 'noteId' + '}', note_id.to_s)
564
-
565
- # query parameters
566
- query_params = {}
567
-
568
- # header parameters
569
- header_params = {}
570
-
571
- # HTTP header 'Accept' (if needed)
572
- _header_accept = ['application/json']
573
- _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
574
-
575
- # HTTP header 'Content-Type'
576
- _header_content_type = ['application/json']
577
- header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
578
-
579
- # form parameters
580
- form_params = {}
581
-
582
- # http body (model)
583
- post_body = nil
584
-
585
- auth_names = ['PureCloud Auth']
586
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
587
- :header_params => header_params,
588
- :query_params => query_params,
589
- :form_params => form_params,
590
- :body => post_body,
591
- :auth_names => auth_names,
592
- :return_type => 'Note')
593
- if @api_client.config.debugging
594
- @api_client.config.logger.debug "API called: ExternalContactsApi#get_contacts_contact_id_notes_note_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
595
- end
596
- return data, status_code, headers
597
- end
598
-
599
- # Search for External Organizations
600
- #
601
- # @param [Hash] opts the optional parameters
602
- # @option opts [Integer] :page_size Page size (default to 20)
603
- # @option opts [Integer] :page_number Page number (default to 1)
604
- # @option opts [String] :q Search query
605
- # @option opts [String] :sort_order Sort order
606
- # @return [ExternalOrganizationListing]
607
- def get_organizations(opts = {})
608
- data, status_code, headers = get_organizations_with_http_info(opts)
609
- return data
610
- end
611
-
612
- # Search for External Organizations
613
- #
614
- # @param [Hash] opts the optional parameters
615
- # @option opts [Integer] :page_size Page size
616
- # @option opts [Integer] :page_number Page number
617
- # @option opts [String] :q Search query
618
- # @option opts [String] :sort_order Sort order
619
- # @return [Array<(ExternalOrganizationListing, Fixnum, Hash)>] ExternalOrganizationListing data, response status code and response headers
620
- def get_organizations_with_http_info(opts = {})
621
- if @api_client.config.debugging
622
- @api_client.config.logger.debug "Calling API: ExternalContactsApi#get_organizations ..."
623
- end
624
-
625
- # resource path
626
- local_var_path = "/api/v2/externalcontacts/organizations".sub('{format}','json')
627
-
628
- # query parameters
629
- query_params = {}
630
- query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size']
631
- query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number']
632
- query_params[:'q'] = opts[:'q'] if opts[:'q']
633
- query_params[:'sortOrder'] = opts[:'sort_order'] if opts[:'sort_order']
634
-
635
- # header parameters
636
- header_params = {}
637
-
638
- # HTTP header 'Accept' (if needed)
639
- _header_accept = ['application/json']
640
- _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
641
-
642
- # HTTP header 'Content-Type'
643
- _header_content_type = ['application/json']
644
- header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
645
-
646
- # form parameters
647
- form_params = {}
648
-
649
- # http body (model)
650
- post_body = nil
651
-
652
- auth_names = ['PureCloud Auth']
653
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
654
- :header_params => header_params,
655
- :query_params => query_params,
656
- :form_params => form_params,
657
- :body => post_body,
658
- :auth_names => auth_names,
659
- :return_type => 'ExternalOrganizationListing')
660
- if @api_client.config.debugging
661
- @api_client.config.logger.debug "API called: ExternalContactsApi#get_organizations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
662
- end
663
- return data, status_code, headers
664
- end
665
-
666
- # Fetch an External Organization
667
- #
668
- # @param external_organization_id External Organization ID
669
- # @param [Hash] opts the optional parameters
670
- # @return [ExternalOrganization]
671
- def get_organizations_externalorganization_id(external_organization_id, opts = {})
672
- data, status_code, headers = get_organizations_externalorganization_id_with_http_info(external_organization_id, opts)
673
- return data
674
- end
675
-
676
- # Fetch an External Organization
677
- #
678
- # @param external_organization_id External Organization ID
679
- # @param [Hash] opts the optional parameters
680
- # @return [Array<(ExternalOrganization, Fixnum, Hash)>] ExternalOrganization data, response status code and response headers
681
- def get_organizations_externalorganization_id_with_http_info(external_organization_id, opts = {})
682
- if @api_client.config.debugging
683
- @api_client.config.logger.debug "Calling API: ExternalContactsApi#get_organizations_externalorganization_id ..."
684
- end
685
-
686
- # verify the required parameter 'external_organization_id' is set
687
- fail "Missing the required parameter 'external_organization_id' when calling get_organizations_externalorganization_id" if external_organization_id.nil?
688
-
689
- # resource path
690
- local_var_path = "/api/v2/externalcontacts/organizations/{externalOrganizationId}".sub('{format}','json').sub('{' + 'externalOrganizationId' + '}', external_organization_id.to_s)
691
-
692
- # query parameters
693
- query_params = {}
694
-
695
- # header parameters
696
- header_params = {}
697
-
698
- # HTTP header 'Accept' (if needed)
699
- _header_accept = ['application/json']
700
- _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
701
-
702
- # HTTP header 'Content-Type'
703
- _header_content_type = ['application/json']
704
- header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
705
-
706
- # form parameters
707
- form_params = {}
708
-
709
- # http body (model)
710
- post_body = nil
711
-
712
- auth_names = ['PureCloud Auth']
713
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
714
- :header_params => header_params,
715
- :query_params => query_params,
716
- :form_params => form_params,
717
- :body => post_body,
718
- :auth_names => auth_names,
719
- :return_type => 'ExternalOrganization')
720
- if @api_client.config.debugging
721
- @api_client.config.logger.debug "API called: ExternalContactsApi#get_organizations_externalorganization_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
722
- end
723
- return data, status_code, headers
724
- end
725
-
726
- # Search for External Contacts
727
- #
728
- # @param external_organization_id External Organization ID
729
- # @param [Hash] opts the optional parameters
730
- # @option opts [Integer] :page_size Page size (default to 20)
731
- # @option opts [Integer] :page_number Page number (default to 1)
732
- # @option opts [String] :q User supplied search keywords (no special syntax is currently supported)
733
- # @option opts [String] :sort_order Sort order
734
- # @option opts [Array<String>] :expand which fields, if any, to expand
735
- # @return [ContactListing]
736
- def get_organizations_externalorganization_id_contacts(external_organization_id, opts = {})
737
- data, status_code, headers = get_organizations_externalorganization_id_contacts_with_http_info(external_organization_id, opts)
738
- return data
739
- end
740
-
741
- # Search for External Contacts
742
- #
743
- # @param external_organization_id External Organization ID
744
- # @param [Hash] opts the optional parameters
745
- # @option opts [Integer] :page_size Page size
746
- # @option opts [Integer] :page_number Page number
747
- # @option opts [String] :q User supplied search keywords (no special syntax is currently supported)
748
- # @option opts [String] :sort_order Sort order
749
- # @option opts [Array<String>] :expand which fields, if any, to expand
750
- # @return [Array<(ContactListing, Fixnum, Hash)>] ContactListing data, response status code and response headers
751
- def get_organizations_externalorganization_id_contacts_with_http_info(external_organization_id, opts = {})
752
- if @api_client.config.debugging
753
- @api_client.config.logger.debug "Calling API: ExternalContactsApi#get_organizations_externalorganization_id_contacts ..."
754
- end
755
-
756
- # verify the required parameter 'external_organization_id' is set
757
- fail "Missing the required parameter 'external_organization_id' when calling get_organizations_externalorganization_id_contacts" if external_organization_id.nil?
758
-
759
- # resource path
760
- local_var_path = "/api/v2/externalcontacts/organizations/{externalOrganizationId}/contacts".sub('{format}','json').sub('{' + 'externalOrganizationId' + '}', external_organization_id.to_s)
761
-
762
- # query parameters
763
- query_params = {}
764
- query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size']
765
- query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number']
766
- query_params[:'q'] = opts[:'q'] if opts[:'q']
767
- query_params[:'sortOrder'] = opts[:'sort_order'] if opts[:'sort_order']
768
- query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand']
769
-
770
- # header parameters
771
- header_params = {}
772
-
773
- # HTTP header 'Accept' (if needed)
774
- _header_accept = ['application/json']
775
- _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
776
-
777
- # HTTP header 'Content-Type'
778
- _header_content_type = ['application/json']
779
- header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
780
-
781
- # form parameters
782
- form_params = {}
783
-
784
- # http body (model)
785
- post_body = nil
786
-
787
- auth_names = ['PureCloud Auth']
788
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
789
- :header_params => header_params,
790
- :query_params => query_params,
791
- :form_params => form_params,
792
- :body => post_body,
793
- :auth_names => auth_names,
794
- :return_type => 'ContactListing')
795
- if @api_client.config.debugging
796
- @api_client.config.logger.debug "API called: ExternalContactsApi#get_organizations_externalorganization_id_contacts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
797
- end
798
- return data, status_code, headers
799
- end
800
-
801
- # List Notes for an External Organization
802
- #
803
- # @param external_organization_id External Organization Id
804
- # @param [Hash] opts the optional parameters
805
- # @option opts [Integer] :page_size Page size (default to 20)
806
- # @option opts [Integer] :page_number Page number (default to 1)
807
- # @option opts [String] :sort_order Sort order
808
- # @return [NoteListing]
809
- def get_organizations_externalorganization_id_notes(external_organization_id, opts = {})
810
- data, status_code, headers = get_organizations_externalorganization_id_notes_with_http_info(external_organization_id, opts)
811
- return data
812
- end
813
-
814
- # List Notes for an External Organization
815
- #
816
- # @param external_organization_id External Organization Id
817
- # @param [Hash] opts the optional parameters
818
- # @option opts [Integer] :page_size Page size
819
- # @option opts [Integer] :page_number Page number
820
- # @option opts [String] :sort_order Sort order
821
- # @return [Array<(NoteListing, Fixnum, Hash)>] NoteListing data, response status code and response headers
822
- def get_organizations_externalorganization_id_notes_with_http_info(external_organization_id, opts = {})
823
- if @api_client.config.debugging
824
- @api_client.config.logger.debug "Calling API: ExternalContactsApi#get_organizations_externalorganization_id_notes ..."
825
- end
826
-
827
- # verify the required parameter 'external_organization_id' is set
828
- fail "Missing the required parameter 'external_organization_id' when calling get_organizations_externalorganization_id_notes" if external_organization_id.nil?
829
-
830
- # resource path
831
- local_var_path = "/api/v2/externalcontacts/organizations/{externalOrganizationId}/notes".sub('{format}','json').sub('{' + 'externalOrganizationId' + '}', external_organization_id.to_s)
832
-
833
- # query parameters
834
- query_params = {}
835
- query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size']
836
- query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number']
837
- query_params[:'sortOrder'] = opts[:'sort_order'] if opts[:'sort_order']
838
-
839
- # header parameters
840
- header_params = {}
841
-
842
- # HTTP header 'Accept' (if needed)
843
- _header_accept = ['application/json']
844
- _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
845
-
846
- # HTTP header 'Content-Type'
847
- _header_content_type = ['application/json']
848
- header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
849
-
850
- # form parameters
851
- form_params = {}
852
-
853
- # http body (model)
854
- post_body = nil
855
-
856
- auth_names = ['PureCloud Auth']
857
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
858
- :header_params => header_params,
859
- :query_params => query_params,
860
- :form_params => form_params,
861
- :body => post_body,
862
- :auth_names => auth_names,
863
- :return_type => 'NoteListing')
864
- if @api_client.config.debugging
865
- @api_client.config.logger.debug "API called: ExternalContactsApi#get_organizations_externalorganization_id_notes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
866
- end
867
- return data, status_code, headers
868
- end
869
-
870
- # Fetch a note
871
- #
872
- # @param external_organization_id External Organization Id
873
- # @param note_id Note Id
874
- # @param [Hash] opts the optional parameters
875
- # @return [Note]
876
- def get_organizations_externalorganization_id_notes_note_id(external_organization_id, note_id, opts = {})
877
- data, status_code, headers = get_organizations_externalorganization_id_notes_note_id_with_http_info(external_organization_id, note_id, opts)
878
- return data
879
- end
880
-
881
- # Fetch a note
882
- #
883
- # @param external_organization_id External Organization Id
884
- # @param note_id Note Id
885
- # @param [Hash] opts the optional parameters
886
- # @return [Array<(Note, Fixnum, Hash)>] Note data, response status code and response headers
887
- def get_organizations_externalorganization_id_notes_note_id_with_http_info(external_organization_id, note_id, opts = {})
888
- if @api_client.config.debugging
889
- @api_client.config.logger.debug "Calling API: ExternalContactsApi#get_organizations_externalorganization_id_notes_note_id ..."
890
- end
891
-
892
- # verify the required parameter 'external_organization_id' is set
893
- fail "Missing the required parameter 'external_organization_id' when calling get_organizations_externalorganization_id_notes_note_id" if external_organization_id.nil?
894
-
895
- # verify the required parameter 'note_id' is set
896
- fail "Missing the required parameter 'note_id' when calling get_organizations_externalorganization_id_notes_note_id" if note_id.nil?
897
-
898
- # resource path
899
- local_var_path = "/api/v2/externalcontacts/organizations/{externalOrganizationId}/notes/{noteId}".sub('{format}','json').sub('{' + 'externalOrganizationId' + '}', external_organization_id.to_s).sub('{' + 'noteId' + '}', note_id.to_s)
900
-
901
- # query parameters
902
- query_params = {}
903
-
904
- # header parameters
905
- header_params = {}
906
-
907
- # HTTP header 'Accept' (if needed)
908
- _header_accept = ['application/json']
909
- _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
910
-
911
- # HTTP header 'Content-Type'
912
- _header_content_type = ['application/json']
913
- header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
914
-
915
- # form parameters
916
- form_params = {}
917
-
918
- # http body (model)
919
- post_body = nil
920
-
921
- auth_names = ['PureCloud Auth']
922
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
923
- :header_params => header_params,
924
- :query_params => query_params,
925
- :form_params => form_params,
926
- :body => post_body,
927
- :auth_names => auth_names,
928
- :return_type => 'Note')
929
- if @api_client.config.debugging
930
- @api_client.config.logger.debug "API called: ExternalContactsApi#get_organizations_externalorganization_id_notes_note_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
931
- end
932
- return data, status_code, headers
933
- end
934
-
935
- # Fetch an External Organization
936
- #
937
- # @param external_organization_id External Organization ID
938
- # @param [Hash] opts the optional parameters
939
- # @option opts [Integer] :page_size Page size (default to 20)
940
- # @option opts [Integer] :page_number Page number (default to 1)
941
- # @option opts [String] :sort_order Sort order
942
- # @return [RelationshipListing]
943
- def get_organizations_externalorganization_id_relationships(external_organization_id, opts = {})
944
- data, status_code, headers = get_organizations_externalorganization_id_relationships_with_http_info(external_organization_id, opts)
945
- return data
946
- end
947
-
948
- # Fetch an External Organization
949
- #
950
- # @param external_organization_id External Organization ID
951
- # @param [Hash] opts the optional parameters
952
- # @option opts [Integer] :page_size Page size
953
- # @option opts [Integer] :page_number Page number
954
- # @option opts [String] :sort_order Sort order
955
- # @return [Array<(RelationshipListing, Fixnum, Hash)>] RelationshipListing data, response status code and response headers
956
- def get_organizations_externalorganization_id_relationships_with_http_info(external_organization_id, opts = {})
957
- if @api_client.config.debugging
958
- @api_client.config.logger.debug "Calling API: ExternalContactsApi#get_organizations_externalorganization_id_relationships ..."
959
- end
960
-
961
- # verify the required parameter 'external_organization_id' is set
962
- fail "Missing the required parameter 'external_organization_id' when calling get_organizations_externalorganization_id_relationships" if external_organization_id.nil?
963
-
964
- # resource path
965
- local_var_path = "/api/v2/externalcontacts/organizations/{externalOrganizationId}/relationships".sub('{format}','json').sub('{' + 'externalOrganizationId' + '}', external_organization_id.to_s)
966
-
967
- # query parameters
968
- query_params = {}
969
- query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size']
970
- query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number']
971
- query_params[:'sortOrder'] = opts[:'sort_order'] if opts[:'sort_order']
972
-
973
- # header parameters
974
- header_params = {}
975
-
976
- # HTTP header 'Accept' (if needed)
977
- _header_accept = ['application/json']
978
- _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
979
-
980
- # HTTP header 'Content-Type'
981
- _header_content_type = ['application/json']
982
- header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
983
-
984
- # form parameters
985
- form_params = {}
986
-
987
- # http body (model)
988
- post_body = nil
989
-
990
- auth_names = ['PureCloud Auth']
991
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
992
- :header_params => header_params,
993
- :query_params => query_params,
994
- :form_params => form_params,
995
- :body => post_body,
996
- :auth_names => auth_names,
997
- :return_type => 'RelationshipListing')
998
- if @api_client.config.debugging
999
- @api_client.config.logger.debug "API called: ExternalContactsApi#get_organizations_externalorganization_id_relationships\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1000
- end
1001
- return data, status_code, headers
1002
- end
1003
-
1004
- # Fetch a relationship
1005
- #
1006
- # @param relationship_id Relationship Id
1007
- # @param [Hash] opts the optional parameters
1008
- # @return [Relationship]
1009
- def get_relationships_relationship_id(relationship_id, opts = {})
1010
- data, status_code, headers = get_relationships_relationship_id_with_http_info(relationship_id, opts)
1011
- return data
1012
- end
1013
-
1014
- # Fetch a relationship
1015
- #
1016
- # @param relationship_id Relationship Id
1017
- # @param [Hash] opts the optional parameters
1018
- # @return [Array<(Relationship, Fixnum, Hash)>] Relationship data, response status code and response headers
1019
- def get_relationships_relationship_id_with_http_info(relationship_id, opts = {})
1020
- if @api_client.config.debugging
1021
- @api_client.config.logger.debug "Calling API: ExternalContactsApi#get_relationships_relationship_id ..."
1022
- end
1023
-
1024
- # verify the required parameter 'relationship_id' is set
1025
- fail "Missing the required parameter 'relationship_id' when calling get_relationships_relationship_id" if relationship_id.nil?
1026
-
1027
- # resource path
1028
- local_var_path = "/api/v2/externalcontacts/relationships/{relationshipId}".sub('{format}','json').sub('{' + 'relationshipId' + '}', relationship_id.to_s)
1029
-
1030
- # query parameters
1031
- query_params = {}
1032
-
1033
- # header parameters
1034
- header_params = {}
1035
-
1036
- # HTTP header 'Accept' (if needed)
1037
- _header_accept = ['application/json']
1038
- _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
1039
-
1040
- # HTTP header 'Content-Type'
1041
- _header_content_type = ['application/json']
1042
- header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
1043
-
1044
- # form parameters
1045
- form_params = {}
1046
-
1047
- # http body (model)
1048
- post_body = nil
1049
-
1050
- auth_names = ['PureCloud Auth']
1051
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1052
- :header_params => header_params,
1053
- :query_params => query_params,
1054
- :form_params => form_params,
1055
- :body => post_body,
1056
- :auth_names => auth_names,
1057
- :return_type => 'Relationship')
1058
- if @api_client.config.debugging
1059
- @api_client.config.logger.debug "API called: ExternalContactsApi#get_relationships_relationship_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1060
- end
1061
- return data, status_code, headers
1062
- end
1063
-
1064
- # Create an ExternalContact
1065
- #
1066
- # @param [Hash] opts the optional parameters
1067
- # @option opts [ExternalContact] :body ExternalContact
1068
- # @return [ExternalContact]
1069
- def post_contacts(opts = {})
1070
- data, status_code, headers = post_contacts_with_http_info(opts)
1071
- return data
1072
- end
1073
-
1074
- # Create an ExternalContact
1075
- #
1076
- # @param [Hash] opts the optional parameters
1077
- # @option opts [ExternalContact] :body ExternalContact
1078
- # @return [Array<(ExternalContact, Fixnum, Hash)>] ExternalContact data, response status code and response headers
1079
- def post_contacts_with_http_info(opts = {})
1080
- if @api_client.config.debugging
1081
- @api_client.config.logger.debug "Calling API: ExternalContactsApi#post_contacts ..."
1082
- end
1083
-
1084
- # resource path
1085
- local_var_path = "/api/v2/externalcontacts/contacts".sub('{format}','json')
1086
-
1087
- # query parameters
1088
- query_params = {}
1089
-
1090
- # header parameters
1091
- header_params = {}
1092
-
1093
- # HTTP header 'Accept' (if needed)
1094
- _header_accept = ['application/json']
1095
- _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
1096
-
1097
- # HTTP header 'Content-Type'
1098
- _header_content_type = ['application/json']
1099
- header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
1100
-
1101
- # form parameters
1102
- form_params = {}
1103
-
1104
- # http body (model)
1105
- post_body = @api_client.object_to_http_body(opts[:'body'])
1106
-
1107
- auth_names = ['PureCloud Auth']
1108
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
1109
- :header_params => header_params,
1110
- :query_params => query_params,
1111
- :form_params => form_params,
1112
- :body => post_body,
1113
- :auth_names => auth_names,
1114
- :return_type => 'ExternalContact')
1115
- if @api_client.config.debugging
1116
- @api_client.config.logger.debug "API called: ExternalContactsApi#post_contacts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1117
- end
1118
- return data, status_code, headers
1119
- end
1120
-
1121
- # Create a Note for an ExternalContact
1122
- #
1123
- # @param contact_id ExternalContact Id
1124
- # @param [Hash] opts the optional parameters
1125
- # @option opts [Note] :body ExternalContact
1126
- # @return [Note]
1127
- def post_contacts_contact_id_notes(contact_id, opts = {})
1128
- data, status_code, headers = post_contacts_contact_id_notes_with_http_info(contact_id, opts)
1129
- return data
1130
- end
1131
-
1132
- # Create a Note for an ExternalContact
1133
- #
1134
- # @param contact_id ExternalContact Id
1135
- # @param [Hash] opts the optional parameters
1136
- # @option opts [Note] :body ExternalContact
1137
- # @return [Array<(Note, Fixnum, Hash)>] Note data, response status code and response headers
1138
- def post_contacts_contact_id_notes_with_http_info(contact_id, opts = {})
1139
- if @api_client.config.debugging
1140
- @api_client.config.logger.debug "Calling API: ExternalContactsApi#post_contacts_contact_id_notes ..."
1141
- end
1142
-
1143
- # verify the required parameter 'contact_id' is set
1144
- fail "Missing the required parameter 'contact_id' when calling post_contacts_contact_id_notes" if contact_id.nil?
1145
-
1146
- # resource path
1147
- local_var_path = "/api/v2/externalcontacts/contacts/{contactId}/notes".sub('{format}','json').sub('{' + 'contactId' + '}', contact_id.to_s)
1148
-
1149
- # query parameters
1150
- query_params = {}
1151
-
1152
- # header parameters
1153
- header_params = {}
1154
-
1155
- # HTTP header 'Accept' (if needed)
1156
- _header_accept = ['application/json']
1157
- _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
1158
-
1159
- # HTTP header 'Content-Type'
1160
- _header_content_type = ['application/json']
1161
- header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
1162
-
1163
- # form parameters
1164
- form_params = {}
1165
-
1166
- # http body (model)
1167
- post_body = @api_client.object_to_http_body(opts[:'body'])
1168
-
1169
- auth_names = ['PureCloud Auth']
1170
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
1171
- :header_params => header_params,
1172
- :query_params => query_params,
1173
- :form_params => form_params,
1174
- :body => post_body,
1175
- :auth_names => auth_names,
1176
- :return_type => 'Note')
1177
- if @api_client.config.debugging
1178
- @api_client.config.logger.debug "API called: ExternalContactsApi#post_contacts_contact_id_notes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1179
- end
1180
- return data, status_code, headers
1181
- end
1182
-
1183
- # Create an External Organization
1184
- #
1185
- # @param [Hash] opts the optional parameters
1186
- # @option opts [ExternalOrganization] :body ExternalOrganization
1187
- # @return [ExternalOrganization]
1188
- def post_organizations(opts = {})
1189
- data, status_code, headers = post_organizations_with_http_info(opts)
1190
- return data
1191
- end
1192
-
1193
- # Create an External Organization
1194
- #
1195
- # @param [Hash] opts the optional parameters
1196
- # @option opts [ExternalOrganization] :body ExternalOrganization
1197
- # @return [Array<(ExternalOrganization, Fixnum, Hash)>] ExternalOrganization data, response status code and response headers
1198
- def post_organizations_with_http_info(opts = {})
1199
- if @api_client.config.debugging
1200
- @api_client.config.logger.debug "Calling API: ExternalContactsApi#post_organizations ..."
1201
- end
1202
-
1203
- # resource path
1204
- local_var_path = "/api/v2/externalcontacts/organizations".sub('{format}','json')
1205
-
1206
- # query parameters
1207
- query_params = {}
1208
-
1209
- # header parameters
1210
- header_params = {}
1211
-
1212
- # HTTP header 'Accept' (if needed)
1213
- _header_accept = ['application/json']
1214
- _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
1215
-
1216
- # HTTP header 'Content-Type'
1217
- _header_content_type = ['application/json']
1218
- header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
1219
-
1220
- # form parameters
1221
- form_params = {}
1222
-
1223
- # http body (model)
1224
- post_body = @api_client.object_to_http_body(opts[:'body'])
1225
-
1226
- auth_names = ['PureCloud Auth']
1227
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
1228
- :header_params => header_params,
1229
- :query_params => query_params,
1230
- :form_params => form_params,
1231
- :body => post_body,
1232
- :auth_names => auth_names,
1233
- :return_type => 'ExternalOrganization')
1234
- if @api_client.config.debugging
1235
- @api_client.config.logger.debug "API called: ExternalContactsApi#post_organizations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1236
- end
1237
- return data, status_code, headers
1238
- end
1239
-
1240
- # Create a Note for an External Organization
1241
- #
1242
- # @param external_organization_id External Organization Id
1243
- # @param [Hash] opts the optional parameters
1244
- # @option opts [Note] :body ExternalContact
1245
- # @return [Note]
1246
- def post_organizations_externalorganization_id_notes(external_organization_id, opts = {})
1247
- data, status_code, headers = post_organizations_externalorganization_id_notes_with_http_info(external_organization_id, opts)
1248
- return data
1249
- end
1250
-
1251
- # Create a Note for an External Organization
1252
- #
1253
- # @param external_organization_id External Organization Id
1254
- # @param [Hash] opts the optional parameters
1255
- # @option opts [Note] :body ExternalContact
1256
- # @return [Array<(Note, Fixnum, Hash)>] Note data, response status code and response headers
1257
- def post_organizations_externalorganization_id_notes_with_http_info(external_organization_id, opts = {})
1258
- if @api_client.config.debugging
1259
- @api_client.config.logger.debug "Calling API: ExternalContactsApi#post_organizations_externalorganization_id_notes ..."
1260
- end
1261
-
1262
- # verify the required parameter 'external_organization_id' is set
1263
- fail "Missing the required parameter 'external_organization_id' when calling post_organizations_externalorganization_id_notes" if external_organization_id.nil?
1264
-
1265
- # resource path
1266
- local_var_path = "/api/v2/externalcontacts/organizations/{externalOrganizationId}/notes".sub('{format}','json').sub('{' + 'externalOrganizationId' + '}', external_organization_id.to_s)
1267
-
1268
- # query parameters
1269
- query_params = {}
1270
-
1271
- # header parameters
1272
- header_params = {}
1273
-
1274
- # HTTP header 'Accept' (if needed)
1275
- _header_accept = ['application/json']
1276
- _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
1277
-
1278
- # HTTP header 'Content-Type'
1279
- _header_content_type = ['application/json']
1280
- header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
1281
-
1282
- # form parameters
1283
- form_params = {}
1284
-
1285
- # http body (model)
1286
- post_body = @api_client.object_to_http_body(opts[:'body'])
1287
-
1288
- auth_names = ['PureCloud Auth']
1289
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
1290
- :header_params => header_params,
1291
- :query_params => query_params,
1292
- :form_params => form_params,
1293
- :body => post_body,
1294
- :auth_names => auth_names,
1295
- :return_type => 'Note')
1296
- if @api_client.config.debugging
1297
- @api_client.config.logger.debug "API called: ExternalContactsApi#post_organizations_externalorganization_id_notes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1298
- end
1299
- return data, status_code, headers
1300
- end
1301
-
1302
- # Create a relationship
1303
- #
1304
- # @param [Hash] opts the optional parameters
1305
- # @option opts [Relationship] :body Relationship
1306
- # @return [Relationship]
1307
- def post_relationships(opts = {})
1308
- data, status_code, headers = post_relationships_with_http_info(opts)
1309
- return data
1310
- end
1311
-
1312
- # Create a relationship
1313
- #
1314
- # @param [Hash] opts the optional parameters
1315
- # @option opts [Relationship] :body Relationship
1316
- # @return [Array<(Relationship, Fixnum, Hash)>] Relationship data, response status code and response headers
1317
- def post_relationships_with_http_info(opts = {})
1318
- if @api_client.config.debugging
1319
- @api_client.config.logger.debug "Calling API: ExternalContactsApi#post_relationships ..."
1320
- end
1321
-
1322
- # resource path
1323
- local_var_path = "/api/v2/externalcontacts/relationships".sub('{format}','json')
1324
-
1325
- # query parameters
1326
- query_params = {}
1327
-
1328
- # header parameters
1329
- header_params = {}
1330
-
1331
- # HTTP header 'Accept' (if needed)
1332
- _header_accept = ['application/json']
1333
- _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
1334
-
1335
- # HTTP header 'Content-Type'
1336
- _header_content_type = ['application/json']
1337
- header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
1338
-
1339
- # form parameters
1340
- form_params = {}
1341
-
1342
- # http body (model)
1343
- post_body = @api_client.object_to_http_body(opts[:'body'])
1344
-
1345
- auth_names = ['PureCloud Auth']
1346
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
1347
- :header_params => header_params,
1348
- :query_params => query_params,
1349
- :form_params => form_params,
1350
- :body => post_body,
1351
- :auth_names => auth_names,
1352
- :return_type => 'Relationship')
1353
- if @api_client.config.debugging
1354
- @api_client.config.logger.debug "API called: ExternalContactsApi#post_relationships\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1355
- end
1356
- return data, status_code, headers
1357
- end
1358
-
1359
- # Update a externalContact
1360
- #
1361
- # @param contact_id ExternalContact ID
1362
- # @param [Hash] opts the optional parameters
1363
- # @option opts [ExternalContact] :body ExternalContact
1364
- # @return [ExternalContact]
1365
- def put_contacts_contact_id(contact_id, opts = {})
1366
- data, status_code, headers = put_contacts_contact_id_with_http_info(contact_id, opts)
1367
- return data
1368
- end
1369
-
1370
- # Update a externalContact
1371
- #
1372
- # @param contact_id ExternalContact ID
1373
- # @param [Hash] opts the optional parameters
1374
- # @option opts [ExternalContact] :body ExternalContact
1375
- # @return [Array<(ExternalContact, Fixnum, Hash)>] ExternalContact data, response status code and response headers
1376
- def put_contacts_contact_id_with_http_info(contact_id, opts = {})
1377
- if @api_client.config.debugging
1378
- @api_client.config.logger.debug "Calling API: ExternalContactsApi#put_contacts_contact_id ..."
1379
- end
1380
-
1381
- # verify the required parameter 'contact_id' is set
1382
- fail "Missing the required parameter 'contact_id' when calling put_contacts_contact_id" if contact_id.nil?
1383
-
1384
- # resource path
1385
- local_var_path = "/api/v2/externalcontacts/contacts/{contactId}".sub('{format}','json').sub('{' + 'contactId' + '}', contact_id.to_s)
1386
-
1387
- # query parameters
1388
- query_params = {}
1389
-
1390
- # header parameters
1391
- header_params = {}
1392
-
1393
- # HTTP header 'Accept' (if needed)
1394
- _header_accept = ['application/json']
1395
- _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
1396
-
1397
- # HTTP header 'Content-Type'
1398
- _header_content_type = ['application/json']
1399
- header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
1400
-
1401
- # form parameters
1402
- form_params = {}
1403
-
1404
- # http body (model)
1405
- post_body = @api_client.object_to_http_body(opts[:'body'])
1406
-
1407
- auth_names = ['PureCloud Auth']
1408
- data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
1409
- :header_params => header_params,
1410
- :query_params => query_params,
1411
- :form_params => form_params,
1412
- :body => post_body,
1413
- :auth_names => auth_names,
1414
- :return_type => 'ExternalContact')
1415
- if @api_client.config.debugging
1416
- @api_client.config.logger.debug "API called: ExternalContactsApi#put_contacts_contact_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1417
- end
1418
- return data, status_code, headers
1419
- end
1420
-
1421
- # Update a note for a contact
1422
- #
1423
- # @param contact_id ExternalContact Id
1424
- # @param note_id Note Id
1425
- # @param [Hash] opts the optional parameters
1426
- # @option opts [Note] :body Note
1427
- # @return [Note]
1428
- def put_contacts_contact_id_notes_note_id(contact_id, note_id, opts = {})
1429
- data, status_code, headers = put_contacts_contact_id_notes_note_id_with_http_info(contact_id, note_id, opts)
1430
- return data
1431
- end
1432
-
1433
- # Update a note for a contact
1434
- #
1435
- # @param contact_id ExternalContact Id
1436
- # @param note_id Note Id
1437
- # @param [Hash] opts the optional parameters
1438
- # @option opts [Note] :body Note
1439
- # @return [Array<(Note, Fixnum, Hash)>] Note data, response status code and response headers
1440
- def put_contacts_contact_id_notes_note_id_with_http_info(contact_id, note_id, opts = {})
1441
- if @api_client.config.debugging
1442
- @api_client.config.logger.debug "Calling API: ExternalContactsApi#put_contacts_contact_id_notes_note_id ..."
1443
- end
1444
-
1445
- # verify the required parameter 'contact_id' is set
1446
- fail "Missing the required parameter 'contact_id' when calling put_contacts_contact_id_notes_note_id" if contact_id.nil?
1447
-
1448
- # verify the required parameter 'note_id' is set
1449
- fail "Missing the required parameter 'note_id' when calling put_contacts_contact_id_notes_note_id" if note_id.nil?
1450
-
1451
- # resource path
1452
- local_var_path = "/api/v2/externalcontacts/contacts/{contactId}/notes/{noteId}".sub('{format}','json').sub('{' + 'contactId' + '}', contact_id.to_s).sub('{' + 'noteId' + '}', note_id.to_s)
1453
-
1454
- # query parameters
1455
- query_params = {}
1456
-
1457
- # header parameters
1458
- header_params = {}
1459
-
1460
- # HTTP header 'Accept' (if needed)
1461
- _header_accept = ['application/json']
1462
- _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
1463
-
1464
- # HTTP header 'Content-Type'
1465
- _header_content_type = ['application/json']
1466
- header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
1467
-
1468
- # form parameters
1469
- form_params = {}
1470
-
1471
- # http body (model)
1472
- post_body = @api_client.object_to_http_body(opts[:'body'])
1473
-
1474
- auth_names = ['PureCloud Auth']
1475
- data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
1476
- :header_params => header_params,
1477
- :query_params => query_params,
1478
- :form_params => form_params,
1479
- :body => post_body,
1480
- :auth_names => auth_names,
1481
- :return_type => 'Note')
1482
- if @api_client.config.debugging
1483
- @api_client.config.logger.debug "API called: ExternalContactsApi#put_contacts_contact_id_notes_note_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1484
- end
1485
- return data, status_code, headers
1486
- end
1487
-
1488
- # Update an External Organization
1489
- #
1490
- # @param external_organization_id External Organization ID
1491
- # @param [Hash] opts the optional parameters
1492
- # @option opts [ExternalOrganization] :body ExternalOrganization
1493
- # @return [ExternalOrganization]
1494
- def put_organizations_externalorganization_id(external_organization_id, opts = {})
1495
- data, status_code, headers = put_organizations_externalorganization_id_with_http_info(external_organization_id, opts)
1496
- return data
1497
- end
1498
-
1499
- # Update an External Organization
1500
- #
1501
- # @param external_organization_id External Organization ID
1502
- # @param [Hash] opts the optional parameters
1503
- # @option opts [ExternalOrganization] :body ExternalOrganization
1504
- # @return [Array<(ExternalOrganization, Fixnum, Hash)>] ExternalOrganization data, response status code and response headers
1505
- def put_organizations_externalorganization_id_with_http_info(external_organization_id, opts = {})
1506
- if @api_client.config.debugging
1507
- @api_client.config.logger.debug "Calling API: ExternalContactsApi#put_organizations_externalorganization_id ..."
1508
- end
1509
-
1510
- # verify the required parameter 'external_organization_id' is set
1511
- fail "Missing the required parameter 'external_organization_id' when calling put_organizations_externalorganization_id" if external_organization_id.nil?
1512
-
1513
- # resource path
1514
- local_var_path = "/api/v2/externalcontacts/organizations/{externalOrganizationId}".sub('{format}','json').sub('{' + 'externalOrganizationId' + '}', external_organization_id.to_s)
1515
-
1516
- # query parameters
1517
- query_params = {}
1518
-
1519
- # header parameters
1520
- header_params = {}
1521
-
1522
- # HTTP header 'Accept' (if needed)
1523
- _header_accept = ['application/json']
1524
- _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
1525
-
1526
- # HTTP header 'Content-Type'
1527
- _header_content_type = ['application/json']
1528
- header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
1529
-
1530
- # form parameters
1531
- form_params = {}
1532
-
1533
- # http body (model)
1534
- post_body = @api_client.object_to_http_body(opts[:'body'])
1535
-
1536
- auth_names = ['PureCloud Auth']
1537
- data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
1538
- :header_params => header_params,
1539
- :query_params => query_params,
1540
- :form_params => form_params,
1541
- :body => post_body,
1542
- :auth_names => auth_names,
1543
- :return_type => 'ExternalOrganization')
1544
- if @api_client.config.debugging
1545
- @api_client.config.logger.debug "API called: ExternalContactsApi#put_organizations_externalorganization_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1546
- end
1547
- return data, status_code, headers
1548
- end
1549
-
1550
- # Update a note
1551
- #
1552
- # @param external_organization_id External Organization Id
1553
- # @param note_id Note Id
1554
- # @param [Hash] opts the optional parameters
1555
- # @option opts [Note] :body Note
1556
- # @return [Note]
1557
- def put_organizations_externalorganization_id_notes_note_id(external_organization_id, note_id, opts = {})
1558
- data, status_code, headers = put_organizations_externalorganization_id_notes_note_id_with_http_info(external_organization_id, note_id, opts)
1559
- return data
1560
- end
1561
-
1562
- # Update a note
1563
- #
1564
- # @param external_organization_id External Organization Id
1565
- # @param note_id Note Id
1566
- # @param [Hash] opts the optional parameters
1567
- # @option opts [Note] :body Note
1568
- # @return [Array<(Note, Fixnum, Hash)>] Note data, response status code and response headers
1569
- def put_organizations_externalorganization_id_notes_note_id_with_http_info(external_organization_id, note_id, opts = {})
1570
- if @api_client.config.debugging
1571
- @api_client.config.logger.debug "Calling API: ExternalContactsApi#put_organizations_externalorganization_id_notes_note_id ..."
1572
- end
1573
-
1574
- # verify the required parameter 'external_organization_id' is set
1575
- fail "Missing the required parameter 'external_organization_id' when calling put_organizations_externalorganization_id_notes_note_id" if external_organization_id.nil?
1576
-
1577
- # verify the required parameter 'note_id' is set
1578
- fail "Missing the required parameter 'note_id' when calling put_organizations_externalorganization_id_notes_note_id" if note_id.nil?
1579
-
1580
- # resource path
1581
- local_var_path = "/api/v2/externalcontacts/organizations/{externalOrganizationId}/notes/{noteId}".sub('{format}','json').sub('{' + 'externalOrganizationId' + '}', external_organization_id.to_s).sub('{' + 'noteId' + '}', note_id.to_s)
1582
-
1583
- # query parameters
1584
- query_params = {}
1585
-
1586
- # header parameters
1587
- header_params = {}
1588
-
1589
- # HTTP header 'Accept' (if needed)
1590
- _header_accept = ['application/json']
1591
- _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
1592
-
1593
- # HTTP header 'Content-Type'
1594
- _header_content_type = ['application/json']
1595
- header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
1596
-
1597
- # form parameters
1598
- form_params = {}
1599
-
1600
- # http body (model)
1601
- post_body = @api_client.object_to_http_body(opts[:'body'])
1602
-
1603
- auth_names = ['PureCloud Auth']
1604
- data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
1605
- :header_params => header_params,
1606
- :query_params => query_params,
1607
- :form_params => form_params,
1608
- :body => post_body,
1609
- :auth_names => auth_names,
1610
- :return_type => 'Note')
1611
- if @api_client.config.debugging
1612
- @api_client.config.logger.debug "API called: ExternalContactsApi#put_organizations_externalorganization_id_notes_note_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1613
- end
1614
- return data, status_code, headers
1615
- end
1616
-
1617
- # Update a relationship
1618
- #
1619
- # @param relationship_id Relationship Id
1620
- # @param [Hash] opts the optional parameters
1621
- # @option opts [Relationship] :body Relationship
1622
- # @return [Relationship]
1623
- def put_relationships_relationship_id(relationship_id, opts = {})
1624
- data, status_code, headers = put_relationships_relationship_id_with_http_info(relationship_id, opts)
1625
- return data
1626
- end
1627
-
1628
- # Update a relationship
1629
- #
1630
- # @param relationship_id Relationship Id
1631
- # @param [Hash] opts the optional parameters
1632
- # @option opts [Relationship] :body Relationship
1633
- # @return [Array<(Relationship, Fixnum, Hash)>] Relationship data, response status code and response headers
1634
- def put_relationships_relationship_id_with_http_info(relationship_id, opts = {})
1635
- if @api_client.config.debugging
1636
- @api_client.config.logger.debug "Calling API: ExternalContactsApi#put_relationships_relationship_id ..."
1637
- end
1638
-
1639
- # verify the required parameter 'relationship_id' is set
1640
- fail "Missing the required parameter 'relationship_id' when calling put_relationships_relationship_id" if relationship_id.nil?
1641
-
1642
- # resource path
1643
- local_var_path = "/api/v2/externalcontacts/relationships/{relationshipId}".sub('{format}','json').sub('{' + 'relationshipId' + '}', relationship_id.to_s)
1644
-
1645
- # query parameters
1646
- query_params = {}
1647
-
1648
- # header parameters
1649
- header_params = {}
1650
-
1651
- # HTTP header 'Accept' (if needed)
1652
- _header_accept = ['application/json']
1653
- _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
1654
-
1655
- # HTTP header 'Content-Type'
1656
- _header_content_type = ['application/json']
1657
- header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
1658
-
1659
- # form parameters
1660
- form_params = {}
1661
-
1662
- # http body (model)
1663
- post_body = @api_client.object_to_http_body(opts[:'body'])
1664
-
1665
- auth_names = ['PureCloud Auth']
1666
- data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
1667
- :header_params => header_params,
1668
- :query_params => query_params,
1669
- :form_params => form_params,
1670
- :body => post_body,
1671
- :auth_names => auth_names,
1672
- :return_type => 'Relationship')
1673
- if @api_client.config.debugging
1674
- @api_client.config.logger.debug "API called: ExternalContactsApi#put_relationships_relationship_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1675
- end
1676
- return data, status_code, headers
1677
- end
1678
- end
1679
- end