purecloud 0.18.0 → 0.25.0

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