purecloud 0.61.1 → 0.62.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/bin/notificationMappings.json +4 -0
- data/config-ruby.json +1 -1
- data/doc_out/BillingTaskResultNotification.html.md +21 -0
- data/doc_out/CampaignRule.html.md +23 -0
- data/doc_out/CampaignRuleAction.html.md +16 -0
- data/doc_out/CampaignRuleActionEntities.html.md +15 -0
- data/doc_out/CampaignRuleCondition.html.md +15 -0
- data/doc_out/CampaignRuleEntities.html.md +14 -0
- data/doc_out/CampaignRuleEntityListing.html.md +22 -0
- data/doc_out/OutboundApi.html.md +299 -0
- data/doc_out/QualityAudit.html.md +1 -1
- data/doc_out/VoicemailGroupPolicy.html.md +2 -0
- data/doc_out/index.html.md +3 -3
- data/lib/purecloud.rb +7 -0
- data/lib/purecloud/api/outbound_api.rb +326 -0
- data/lib/purecloud/api_client.rb +1 -1
- data/lib/purecloud/models/billing_task_result_notification.rb +263 -0
- data/lib/purecloud/models/campaign_rule.rb +281 -0
- data/lib/purecloud/models/campaign_rule_action.rb +206 -0
- data/lib/purecloud/models/campaign_rule_action_entities.rb +191 -0
- data/lib/purecloud/models/campaign_rule_condition.rb +196 -0
- data/lib/purecloud/models/campaign_rule_entities.rb +179 -0
- data/lib/purecloud/models/campaign_rule_entity_listing.rb +257 -0
- data/lib/purecloud/models/quality_audit.rb +11 -11
- data/lib/purecloud/models/voicemail_group_policy.rb +26 -4
- data/lib/purecloud/version.rb +1 -1
- data/newVersion.md +1 -1
- data/swagger.json +1 -1
- data/version.json +1 -1
- metadata +16 -2
@@ -15,8 +15,8 @@ title: QualityAudit
|
|
15
15
|
| **entity** | [**AuditEntity**](AuditEntity.html) | | [optional] |
|
16
16
|
| **action** | **String** | | [optional] |
|
17
17
|
| **status** | **String** | | [optional] |
|
18
|
-
| **changes** | [**Array<Change>**](Change.html) | | [optional] |
|
19
18
|
| **entity_type** | **String** | | [optional] |
|
19
|
+
| **changes** | [**Array<Change>**](Change.html) | | [optional] |
|
20
20
|
| **self_uri** | **String** | The URI for this object | [optional] |
|
21
21
|
{: class="table table-striped"}
|
22
22
|
|
@@ -11,6 +11,8 @@ title: VoicemailGroupPolicy
|
|
11
11
|
| **group** | [**Group**](Group.html) | The group associated with the policy | [optional] |
|
12
12
|
| **enabled** | **BOOLEAN** | Whether voicemail is enabled for the group | [optional] [default to false]|
|
13
13
|
| **send_email_notifications** | **BOOLEAN** | Whether email notifications are sent to group members when a new voicemail is received | [optional] [default to false]|
|
14
|
+
| **rotate_calls_secs** | **Integer** | How many seconds to ring before rotating to the next member in the group | [optional] |
|
15
|
+
| **stop_ringing_after_rotations** | **Integer** | How many rotations to go through | [optional] |
|
14
16
|
{: class="table table-striped"}
|
15
17
|
|
16
18
|
|
data/doc_out/index.html.md
CHANGED
@@ -9,8 +9,8 @@ With the PureCloud Platform API, you can control all aspects of your PureCloud e
|
|
9
9
|
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
10
10
|
|
11
11
|
- API version: v2
|
12
|
-
- Package version: 0.
|
13
|
-
- Build date: 2016-12-
|
12
|
+
- Package version: 0.62.1
|
13
|
+
- Build date: 2016-12-28T20:28:45.785Z
|
14
14
|
|
15
15
|
For more information, please visit [https://developer.mypurecloud.com](https://developer.mypurecloud.com)
|
16
16
|
|
@@ -18,7 +18,7 @@ For more information, please visit [https://developer.mypurecloud.com](https://d
|
|
18
18
|
|
19
19
|
### from rubygems.org
|
20
20
|
|
21
|
-
gem 'purecloud', '~> 0.
|
21
|
+
gem 'purecloud', '~> 0.62.1'
|
22
22
|
|
23
23
|
### Install from Git
|
24
24
|
|
data/lib/purecloud.rb
CHANGED
@@ -73,6 +73,7 @@ require 'purecloud/models/available_language_list'
|
|
73
73
|
require 'purecloud/models/available_topic'
|
74
74
|
require 'purecloud/models/available_topic_entity_listing'
|
75
75
|
require 'purecloud/models/available_translations'
|
76
|
+
require 'purecloud/models/billing_task_result_notification'
|
76
77
|
require 'purecloud/models/bullseye'
|
77
78
|
require 'purecloud/models/calibration'
|
78
79
|
require 'purecloud/models/calibration_assignment'
|
@@ -120,6 +121,12 @@ require 'purecloud/models/campaign_entity_listing'
|
|
120
121
|
require 'purecloud/models/campaign_interaction'
|
121
122
|
require 'purecloud/models/campaign_interactions'
|
122
123
|
require 'purecloud/models/campaign_progress'
|
124
|
+
require 'purecloud/models/campaign_rule'
|
125
|
+
require 'purecloud/models/campaign_rule_action'
|
126
|
+
require 'purecloud/models/campaign_rule_action_entities'
|
127
|
+
require 'purecloud/models/campaign_rule_condition'
|
128
|
+
require 'purecloud/models/campaign_rule_entities'
|
129
|
+
require 'purecloud/models/campaign_rule_entity_listing'
|
123
130
|
require 'purecloud/models/campaign_schedule'
|
124
131
|
require 'purecloud/models/campaign_sequence'
|
125
132
|
require 'purecloud/models/campaign_sequence_entity_listing'
|
@@ -204,6 +204,66 @@ module PureCloud
|
|
204
204
|
return data, status_code, headers
|
205
205
|
end
|
206
206
|
|
207
|
+
# Delete Campaign Rule
|
208
|
+
#
|
209
|
+
# @param campaign_rule_id Campaign Rule ID
|
210
|
+
# @param [Hash] opts the optional parameters
|
211
|
+
# @return [String]
|
212
|
+
def delete_campaignrules_campaignrule_id(campaign_rule_id, opts = {})
|
213
|
+
data, status_code, headers = delete_campaignrules_campaignrule_id_with_http_info(campaign_rule_id, opts)
|
214
|
+
return data
|
215
|
+
end
|
216
|
+
|
217
|
+
# Delete Campaign Rule
|
218
|
+
#
|
219
|
+
# @param campaign_rule_id Campaign Rule ID
|
220
|
+
# @param [Hash] opts the optional parameters
|
221
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
222
|
+
def delete_campaignrules_campaignrule_id_with_http_info(campaign_rule_id, opts = {})
|
223
|
+
if @api_client.config.debugging
|
224
|
+
@api_client.config.logger.debug "Calling API: OutboundApi#delete_campaignrules_campaignrule_id ..."
|
225
|
+
end
|
226
|
+
|
227
|
+
# verify the required parameter 'campaign_rule_id' is set
|
228
|
+
fail "Missing the required parameter 'campaign_rule_id' when calling delete_campaignrules_campaignrule_id" if campaign_rule_id.nil?
|
229
|
+
|
230
|
+
# resource path
|
231
|
+
local_var_path = "/api/v2/outbound/campaignrules/{campaignRuleId}".sub('{format}','json').sub('{' + 'campaignRuleId' + '}', campaign_rule_id.to_s)
|
232
|
+
|
233
|
+
# query parameters
|
234
|
+
query_params = {}
|
235
|
+
|
236
|
+
# header parameters
|
237
|
+
header_params = {}
|
238
|
+
|
239
|
+
# HTTP header 'Accept' (if needed)
|
240
|
+
_header_accept = ['application/json']
|
241
|
+
_header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
242
|
+
|
243
|
+
# HTTP header 'Content-Type'
|
244
|
+
_header_content_type = ['application/json']
|
245
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
|
246
|
+
|
247
|
+
# form parameters
|
248
|
+
form_params = {}
|
249
|
+
|
250
|
+
# http body (model)
|
251
|
+
post_body = nil
|
252
|
+
|
253
|
+
auth_names = ['PureCloud Auth']
|
254
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_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 => 'String')
|
261
|
+
if @api_client.config.debugging
|
262
|
+
@api_client.config.logger.debug "API called: OutboundApi#delete_campaignrules_campaignrule_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
263
|
+
end
|
264
|
+
return data, status_code, headers
|
265
|
+
end
|
266
|
+
|
207
267
|
# Delete a campaign.
|
208
268
|
#
|
209
269
|
# @param campaign_id Campaign ID
|
@@ -1172,6 +1232,147 @@ module PureCloud
|
|
1172
1232
|
return data, status_code, headers
|
1173
1233
|
end
|
1174
1234
|
|
1235
|
+
# Query Campaign Rule list
|
1236
|
+
#
|
1237
|
+
# @param [Hash] opts the optional parameters
|
1238
|
+
# @option opts [Integer] :page_size Page size (default to 25)
|
1239
|
+
# @option opts [Integer] :page_number Page number (default to 1)
|
1240
|
+
# @option opts [String] :filter_type Filter type (default to PREFIX)
|
1241
|
+
# @option opts [String] :name Name
|
1242
|
+
# @option opts [String] :sort_by Sort by
|
1243
|
+
# @option opts [String] :sort_order Sort order (default to a)
|
1244
|
+
# @return [CampaignRuleEntityListing]
|
1245
|
+
def get_campaignrules(opts = {})
|
1246
|
+
data, status_code, headers = get_campaignrules_with_http_info(opts)
|
1247
|
+
return data
|
1248
|
+
end
|
1249
|
+
|
1250
|
+
# Query Campaign Rule list
|
1251
|
+
#
|
1252
|
+
# @param [Hash] opts the optional parameters
|
1253
|
+
# @option opts [Integer] :page_size Page size
|
1254
|
+
# @option opts [Integer] :page_number Page number
|
1255
|
+
# @option opts [String] :filter_type Filter type
|
1256
|
+
# @option opts [String] :name Name
|
1257
|
+
# @option opts [String] :sort_by Sort by
|
1258
|
+
# @option opts [String] :sort_order Sort order
|
1259
|
+
# @return [Array<(CampaignRuleEntityListing, Fixnum, Hash)>] CampaignRuleEntityListing data, response status code and response headers
|
1260
|
+
def get_campaignrules_with_http_info(opts = {})
|
1261
|
+
if @api_client.config.debugging
|
1262
|
+
@api_client.config.logger.debug "Calling API: OutboundApi#get_campaignrules ..."
|
1263
|
+
end
|
1264
|
+
|
1265
|
+
if opts[:'filter_type'] && !['Equals', 'RegEx', 'Contains', 'Prefix', 'LessThan', 'LessThanEqualTo', 'GreaterThan', 'GreaterThanEqualTo', 'BeginsWith', 'EndsWith'].include?(opts[:'filter_type'])
|
1266
|
+
fail 'invalid value for "filter_type", must be one of Equals, RegEx, Contains, Prefix, LessThan, LessThanEqualTo, GreaterThan, GreaterThanEqualTo, BeginsWith, EndsWith'
|
1267
|
+
end
|
1268
|
+
|
1269
|
+
if opts[:'sort_order'] && !['ascending', 'descending'].include?(opts[:'sort_order'])
|
1270
|
+
fail 'invalid value for "sort_order", must be one of ascending, descending'
|
1271
|
+
end
|
1272
|
+
|
1273
|
+
# resource path
|
1274
|
+
local_var_path = "/api/v2/outbound/campaignrules".sub('{format}','json')
|
1275
|
+
|
1276
|
+
# query parameters
|
1277
|
+
query_params = {}
|
1278
|
+
query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size']
|
1279
|
+
query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number']
|
1280
|
+
query_params[:'filterType'] = opts[:'filter_type'] if opts[:'filter_type']
|
1281
|
+
query_params[:'name'] = opts[:'name'] if opts[:'name']
|
1282
|
+
query_params[:'sortBy'] = opts[:'sort_by'] if opts[:'sort_by']
|
1283
|
+
query_params[:'sortOrder'] = opts[:'sort_order'] if opts[:'sort_order']
|
1284
|
+
|
1285
|
+
# header parameters
|
1286
|
+
header_params = {}
|
1287
|
+
|
1288
|
+
# HTTP header 'Accept' (if needed)
|
1289
|
+
_header_accept = ['application/json']
|
1290
|
+
_header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
1291
|
+
|
1292
|
+
# HTTP header 'Content-Type'
|
1293
|
+
_header_content_type = ['application/json']
|
1294
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
|
1295
|
+
|
1296
|
+
# form parameters
|
1297
|
+
form_params = {}
|
1298
|
+
|
1299
|
+
# http body (model)
|
1300
|
+
post_body = nil
|
1301
|
+
|
1302
|
+
auth_names = ['PureCloud Auth']
|
1303
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
1304
|
+
:header_params => header_params,
|
1305
|
+
:query_params => query_params,
|
1306
|
+
:form_params => form_params,
|
1307
|
+
:body => post_body,
|
1308
|
+
:auth_names => auth_names,
|
1309
|
+
:return_type => 'CampaignRuleEntityListing')
|
1310
|
+
if @api_client.config.debugging
|
1311
|
+
@api_client.config.logger.debug "API called: OutboundApi#get_campaignrules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1312
|
+
end
|
1313
|
+
return data, status_code, headers
|
1314
|
+
end
|
1315
|
+
|
1316
|
+
# Get Campaign Rule
|
1317
|
+
#
|
1318
|
+
# @param campaign_rule_id Campaign Rule ID
|
1319
|
+
# @param [Hash] opts the optional parameters
|
1320
|
+
# @return [CampaignRule]
|
1321
|
+
def get_campaignrules_campaignrule_id(campaign_rule_id, opts = {})
|
1322
|
+
data, status_code, headers = get_campaignrules_campaignrule_id_with_http_info(campaign_rule_id, opts)
|
1323
|
+
return data
|
1324
|
+
end
|
1325
|
+
|
1326
|
+
# Get Campaign Rule
|
1327
|
+
#
|
1328
|
+
# @param campaign_rule_id Campaign Rule ID
|
1329
|
+
# @param [Hash] opts the optional parameters
|
1330
|
+
# @return [Array<(CampaignRule, Fixnum, Hash)>] CampaignRule data, response status code and response headers
|
1331
|
+
def get_campaignrules_campaignrule_id_with_http_info(campaign_rule_id, opts = {})
|
1332
|
+
if @api_client.config.debugging
|
1333
|
+
@api_client.config.logger.debug "Calling API: OutboundApi#get_campaignrules_campaignrule_id ..."
|
1334
|
+
end
|
1335
|
+
|
1336
|
+
# verify the required parameter 'campaign_rule_id' is set
|
1337
|
+
fail "Missing the required parameter 'campaign_rule_id' when calling get_campaignrules_campaignrule_id" if campaign_rule_id.nil?
|
1338
|
+
|
1339
|
+
# resource path
|
1340
|
+
local_var_path = "/api/v2/outbound/campaignrules/{campaignRuleId}".sub('{format}','json').sub('{' + 'campaignRuleId' + '}', campaign_rule_id.to_s)
|
1341
|
+
|
1342
|
+
# query parameters
|
1343
|
+
query_params = {}
|
1344
|
+
|
1345
|
+
# header parameters
|
1346
|
+
header_params = {}
|
1347
|
+
|
1348
|
+
# HTTP header 'Accept' (if needed)
|
1349
|
+
_header_accept = ['application/json']
|
1350
|
+
_header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
1351
|
+
|
1352
|
+
# HTTP header 'Content-Type'
|
1353
|
+
_header_content_type = ['application/json']
|
1354
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
|
1355
|
+
|
1356
|
+
# form parameters
|
1357
|
+
form_params = {}
|
1358
|
+
|
1359
|
+
# http body (model)
|
1360
|
+
post_body = nil
|
1361
|
+
|
1362
|
+
auth_names = ['PureCloud Auth']
|
1363
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
1364
|
+
:header_params => header_params,
|
1365
|
+
:query_params => query_params,
|
1366
|
+
:form_params => form_params,
|
1367
|
+
:body => post_body,
|
1368
|
+
:auth_names => auth_names,
|
1369
|
+
:return_type => 'CampaignRule')
|
1370
|
+
if @api_client.config.debugging
|
1371
|
+
@api_client.config.logger.debug "API called: OutboundApi#get_campaignrules_campaignrule_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1372
|
+
end
|
1373
|
+
return data, status_code, headers
|
1374
|
+
end
|
1375
|
+
|
1175
1376
|
# Query a list of dialer campaigns.
|
1176
1377
|
#
|
1177
1378
|
# @param [Hash] opts the optional parameters
|
@@ -3007,6 +3208,66 @@ module PureCloud
|
|
3007
3208
|
return data, status_code, headers
|
3008
3209
|
end
|
3009
3210
|
|
3211
|
+
# Create Campaign Rule
|
3212
|
+
#
|
3213
|
+
# @param body CampaignRule
|
3214
|
+
# @param [Hash] opts the optional parameters
|
3215
|
+
# @return [CampaignRule]
|
3216
|
+
def post_campaignrules(body, opts = {})
|
3217
|
+
data, status_code, headers = post_campaignrules_with_http_info(body, opts)
|
3218
|
+
return data
|
3219
|
+
end
|
3220
|
+
|
3221
|
+
# Create Campaign Rule
|
3222
|
+
#
|
3223
|
+
# @param body CampaignRule
|
3224
|
+
# @param [Hash] opts the optional parameters
|
3225
|
+
# @return [Array<(CampaignRule, Fixnum, Hash)>] CampaignRule data, response status code and response headers
|
3226
|
+
def post_campaignrules_with_http_info(body, opts = {})
|
3227
|
+
if @api_client.config.debugging
|
3228
|
+
@api_client.config.logger.debug "Calling API: OutboundApi#post_campaignrules ..."
|
3229
|
+
end
|
3230
|
+
|
3231
|
+
# verify the required parameter 'body' is set
|
3232
|
+
fail "Missing the required parameter 'body' when calling post_campaignrules" if body.nil?
|
3233
|
+
|
3234
|
+
# resource path
|
3235
|
+
local_var_path = "/api/v2/outbound/campaignrules".sub('{format}','json')
|
3236
|
+
|
3237
|
+
# query parameters
|
3238
|
+
query_params = {}
|
3239
|
+
|
3240
|
+
# header parameters
|
3241
|
+
header_params = {}
|
3242
|
+
|
3243
|
+
# HTTP header 'Accept' (if needed)
|
3244
|
+
_header_accept = ['application/json']
|
3245
|
+
_header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
3246
|
+
|
3247
|
+
# HTTP header 'Content-Type'
|
3248
|
+
_header_content_type = ['application/json']
|
3249
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
|
3250
|
+
|
3251
|
+
# form parameters
|
3252
|
+
form_params = {}
|
3253
|
+
|
3254
|
+
# http body (model)
|
3255
|
+
post_body = @api_client.object_to_http_body(body)
|
3256
|
+
|
3257
|
+
auth_names = ['PureCloud Auth']
|
3258
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
3259
|
+
:header_params => header_params,
|
3260
|
+
:query_params => query_params,
|
3261
|
+
:form_params => form_params,
|
3262
|
+
:body => post_body,
|
3263
|
+
:auth_names => auth_names,
|
3264
|
+
:return_type => 'CampaignRule')
|
3265
|
+
if @api_client.config.debugging
|
3266
|
+
@api_client.config.logger.debug "API called: OutboundApi#post_campaignrules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
3267
|
+
end
|
3268
|
+
return data, status_code, headers
|
3269
|
+
end
|
3270
|
+
|
3010
3271
|
# Create a campaign.
|
3011
3272
|
#
|
3012
3273
|
# @param body Campaign
|
@@ -3941,6 +4202,71 @@ module PureCloud
|
|
3941
4202
|
return data, status_code, headers
|
3942
4203
|
end
|
3943
4204
|
|
4205
|
+
# Update Campaign Rule
|
4206
|
+
#
|
4207
|
+
# @param campaign_rule_id Campaign Rule ID
|
4208
|
+
# @param body CampaignRule
|
4209
|
+
# @param [Hash] opts the optional parameters
|
4210
|
+
# @return [CampaignRule]
|
4211
|
+
def put_campaignrules_campaignrule_id(campaign_rule_id, body, opts = {})
|
4212
|
+
data, status_code, headers = put_campaignrules_campaignrule_id_with_http_info(campaign_rule_id, body, opts)
|
4213
|
+
return data
|
4214
|
+
end
|
4215
|
+
|
4216
|
+
# Update Campaign Rule
|
4217
|
+
#
|
4218
|
+
# @param campaign_rule_id Campaign Rule ID
|
4219
|
+
# @param body CampaignRule
|
4220
|
+
# @param [Hash] opts the optional parameters
|
4221
|
+
# @return [Array<(CampaignRule, Fixnum, Hash)>] CampaignRule data, response status code and response headers
|
4222
|
+
def put_campaignrules_campaignrule_id_with_http_info(campaign_rule_id, body, opts = {})
|
4223
|
+
if @api_client.config.debugging
|
4224
|
+
@api_client.config.logger.debug "Calling API: OutboundApi#put_campaignrules_campaignrule_id ..."
|
4225
|
+
end
|
4226
|
+
|
4227
|
+
# verify the required parameter 'campaign_rule_id' is set
|
4228
|
+
fail "Missing the required parameter 'campaign_rule_id' when calling put_campaignrules_campaignrule_id" if campaign_rule_id.nil?
|
4229
|
+
|
4230
|
+
# verify the required parameter 'body' is set
|
4231
|
+
fail "Missing the required parameter 'body' when calling put_campaignrules_campaignrule_id" if body.nil?
|
4232
|
+
|
4233
|
+
# resource path
|
4234
|
+
local_var_path = "/api/v2/outbound/campaignrules/{campaignRuleId}".sub('{format}','json').sub('{' + 'campaignRuleId' + '}', campaign_rule_id.to_s)
|
4235
|
+
|
4236
|
+
# query parameters
|
4237
|
+
query_params = {}
|
4238
|
+
|
4239
|
+
# header parameters
|
4240
|
+
header_params = {}
|
4241
|
+
|
4242
|
+
# HTTP header 'Accept' (if needed)
|
4243
|
+
_header_accept = ['application/json']
|
4244
|
+
_header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
4245
|
+
|
4246
|
+
# HTTP header 'Content-Type'
|
4247
|
+
_header_content_type = ['application/json']
|
4248
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
|
4249
|
+
|
4250
|
+
# form parameters
|
4251
|
+
form_params = {}
|
4252
|
+
|
4253
|
+
# http body (model)
|
4254
|
+
post_body = @api_client.object_to_http_body(body)
|
4255
|
+
|
4256
|
+
auth_names = ['PureCloud Auth']
|
4257
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
4258
|
+
:header_params => header_params,
|
4259
|
+
:query_params => query_params,
|
4260
|
+
:form_params => form_params,
|
4261
|
+
:body => post_body,
|
4262
|
+
:auth_names => auth_names,
|
4263
|
+
:return_type => 'CampaignRule')
|
4264
|
+
if @api_client.config.debugging
|
4265
|
+
@api_client.config.logger.debug "API called: OutboundApi#put_campaignrules_campaignrule_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
4266
|
+
end
|
4267
|
+
return data, status_code, headers
|
4268
|
+
end
|
4269
|
+
|
3944
4270
|
# Update a campaign.
|
3945
4271
|
#
|
3946
4272
|
# @param campaign_id Campaign ID
|
data/lib/purecloud/api_client.rb
CHANGED
@@ -33,7 +33,7 @@ module PureCloud
|
|
33
33
|
|
34
34
|
def initialize(config = Configuration.default)
|
35
35
|
@config = config
|
36
|
-
@user_agent = "PureCloud SDK/Ruby 0.
|
36
|
+
@user_agent = "PureCloud SDK/Ruby 0.62.1"
|
37
37
|
@default_headers = {
|
38
38
|
'Content-Type' => "application/json",
|
39
39
|
'User-Agent' => @user_agent
|
@@ -0,0 +1,263 @@
|
|
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 'date'
|
18
|
+
|
19
|
+
module PureCloud
|
20
|
+
class BillingTaskResultNotification
|
21
|
+
attr_accessor :id
|
22
|
+
|
23
|
+
attr_accessor :name
|
24
|
+
|
25
|
+
attr_accessor :task_type
|
26
|
+
|
27
|
+
attr_accessor :status
|
28
|
+
|
29
|
+
attr_accessor :result_id
|
30
|
+
|
31
|
+
attr_accessor :result_uri
|
32
|
+
|
33
|
+
attr_accessor :result_download_url
|
34
|
+
|
35
|
+
attr_accessor :error_code
|
36
|
+
|
37
|
+
attr_accessor :additional_properties
|
38
|
+
|
39
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
40
|
+
def self.attribute_map
|
41
|
+
{
|
42
|
+
|
43
|
+
:'id' => :'id',
|
44
|
+
|
45
|
+
:'name' => :'name',
|
46
|
+
|
47
|
+
:'task_type' => :'taskType',
|
48
|
+
|
49
|
+
:'status' => :'status',
|
50
|
+
|
51
|
+
:'result_id' => :'resultId',
|
52
|
+
|
53
|
+
:'result_uri' => :'resultUri',
|
54
|
+
|
55
|
+
:'result_download_url' => :'resultDownloadUrl',
|
56
|
+
|
57
|
+
:'error_code' => :'errorCode',
|
58
|
+
|
59
|
+
:'additional_properties' => :'additionalProperties'
|
60
|
+
|
61
|
+
}
|
62
|
+
end
|
63
|
+
|
64
|
+
# Attribute type mapping.
|
65
|
+
def self.swagger_types
|
66
|
+
{
|
67
|
+
:'id' => :'String',
|
68
|
+
:'name' => :'String',
|
69
|
+
:'task_type' => :'String',
|
70
|
+
:'status' => :'String',
|
71
|
+
:'result_id' => :'String',
|
72
|
+
:'result_uri' => :'String',
|
73
|
+
:'result_download_url' => :'String',
|
74
|
+
:'error_code' => :'String',
|
75
|
+
:'additional_properties' => :'Object'
|
76
|
+
|
77
|
+
}
|
78
|
+
end
|
79
|
+
|
80
|
+
def initialize(attributes = {})
|
81
|
+
return unless attributes.is_a?(Hash)
|
82
|
+
|
83
|
+
# convert string to symbol for hash key
|
84
|
+
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
|
85
|
+
|
86
|
+
|
87
|
+
if attributes[:'id']
|
88
|
+
self.id = attributes[:'id']
|
89
|
+
end
|
90
|
+
|
91
|
+
if attributes[:'name']
|
92
|
+
self.name = attributes[:'name']
|
93
|
+
end
|
94
|
+
|
95
|
+
if attributes[:'taskType']
|
96
|
+
self.task_type = attributes[:'taskType']
|
97
|
+
end
|
98
|
+
|
99
|
+
if attributes[:'status']
|
100
|
+
self.status = attributes[:'status']
|
101
|
+
end
|
102
|
+
|
103
|
+
if attributes[:'resultId']
|
104
|
+
self.result_id = attributes[:'resultId']
|
105
|
+
end
|
106
|
+
|
107
|
+
if attributes[:'resultUri']
|
108
|
+
self.result_uri = attributes[:'resultUri']
|
109
|
+
end
|
110
|
+
|
111
|
+
if attributes[:'resultDownloadUrl']
|
112
|
+
self.result_download_url = attributes[:'resultDownloadUrl']
|
113
|
+
end
|
114
|
+
|
115
|
+
if attributes[:'errorCode']
|
116
|
+
self.error_code = attributes[:'errorCode']
|
117
|
+
end
|
118
|
+
|
119
|
+
if attributes[:'additionalProperties']
|
120
|
+
self.additional_properties = attributes[:'additionalProperties']
|
121
|
+
end
|
122
|
+
|
123
|
+
end
|
124
|
+
|
125
|
+
# Custom attribute writer method checking allowed values (enum).
|
126
|
+
def task_type=(task_type)
|
127
|
+
allowed_values = ["GENERATE_PCV_USAGE_REPORT", "GENERATE_BILLABLE_USAGE_REPORT", "GENERATE_CONCURRENT_USAGE_REPORT", "CREATE_QUOTE", "CREATE_SALESFORCE_ACCOUNT", "SUBMIT_QUOTE", "GENERATE_CONTRACT", "OTHER"]
|
128
|
+
if task_type && !allowed_values.include?(task_type)
|
129
|
+
fail "invalid value for 'task_type', must be one of #{allowed_values}"
|
130
|
+
end
|
131
|
+
@task_type = task_type
|
132
|
+
end
|
133
|
+
|
134
|
+
# Custom attribute writer method checking allowed values (enum).
|
135
|
+
def status=(status)
|
136
|
+
allowed_values = ["IN_PROGRESS", "SUCCEEDED", "FAILED"]
|
137
|
+
if status && !allowed_values.include?(status)
|
138
|
+
fail "invalid value for 'status', must be one of #{allowed_values}"
|
139
|
+
end
|
140
|
+
@status = status
|
141
|
+
end
|
142
|
+
|
143
|
+
# Check equality by comparing each attribute.
|
144
|
+
def ==(o)
|
145
|
+
return true if self.equal?(o)
|
146
|
+
self.class == o.class &&
|
147
|
+
id == o.id &&
|
148
|
+
name == o.name &&
|
149
|
+
task_type == o.task_type &&
|
150
|
+
status == o.status &&
|
151
|
+
result_id == o.result_id &&
|
152
|
+
result_uri == o.result_uri &&
|
153
|
+
result_download_url == o.result_download_url &&
|
154
|
+
error_code == o.error_code &&
|
155
|
+
additional_properties == o.additional_properties
|
156
|
+
end
|
157
|
+
|
158
|
+
# @see the `==` method
|
159
|
+
def eql?(o)
|
160
|
+
self == o
|
161
|
+
end
|
162
|
+
|
163
|
+
# Calculate hash code according to all attributes.
|
164
|
+
def hash
|
165
|
+
[id, name, task_type, status, result_id, result_uri, result_download_url, error_code, additional_properties].hash
|
166
|
+
end
|
167
|
+
|
168
|
+
# build the object from hash
|
169
|
+
def build_from_hash(attributes)
|
170
|
+
return nil unless attributes.is_a?(Hash)
|
171
|
+
self.class.swagger_types.each_pair do |key, type|
|
172
|
+
if type =~ /^Array<(.*)>/i
|
173
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
174
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
175
|
+
else
|
176
|
+
#TODO show warning in debug mode
|
177
|
+
end
|
178
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
179
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
180
|
+
else
|
181
|
+
# data not found in attributes(hash), not an issue as the data can be optional
|
182
|
+
end
|
183
|
+
end
|
184
|
+
|
185
|
+
self
|
186
|
+
end
|
187
|
+
|
188
|
+
def _deserialize(type, value)
|
189
|
+
case type.to_sym
|
190
|
+
when :DateTime
|
191
|
+
DateTime.parse(value)
|
192
|
+
when :Date
|
193
|
+
Date.parse(value)
|
194
|
+
when :String
|
195
|
+
value.to_s
|
196
|
+
when :Integer
|
197
|
+
value.to_i
|
198
|
+
when :Float
|
199
|
+
value.to_f
|
200
|
+
when :BOOLEAN
|
201
|
+
if value.to_s =~ /^(true|t|yes|y|1)$/i
|
202
|
+
true
|
203
|
+
else
|
204
|
+
false
|
205
|
+
end
|
206
|
+
when :Object
|
207
|
+
# generic object (usually a Hash), return directly
|
208
|
+
value
|
209
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
210
|
+
inner_type = Regexp.last_match[:inner_type]
|
211
|
+
value.map { |v| _deserialize(inner_type, v) }
|
212
|
+
when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
|
213
|
+
k_type = Regexp.last_match[:k_type]
|
214
|
+
v_type = Regexp.last_match[:v_type]
|
215
|
+
{}.tap do |hash|
|
216
|
+
value.each do |k, v|
|
217
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
218
|
+
end
|
219
|
+
end
|
220
|
+
else # model
|
221
|
+
_model = Object.const_get("PureCloud").const_get(type).new
|
222
|
+
_model.build_from_hash(value)
|
223
|
+
end
|
224
|
+
end
|
225
|
+
|
226
|
+
def to_s
|
227
|
+
to_hash.to_s
|
228
|
+
end
|
229
|
+
|
230
|
+
# to_body is an alias to to_body (backward compatibility))
|
231
|
+
def to_body
|
232
|
+
to_hash
|
233
|
+
end
|
234
|
+
|
235
|
+
# return the object in the form of hash
|
236
|
+
def to_hash
|
237
|
+
hash = {}
|
238
|
+
self.class.attribute_map.each_pair do |attr, param|
|
239
|
+
value = self.send(attr)
|
240
|
+
next if value.nil?
|
241
|
+
hash[param] = _to_hash(value)
|
242
|
+
end
|
243
|
+
hash
|
244
|
+
end
|
245
|
+
|
246
|
+
# Method to output non-array value in the form of hash
|
247
|
+
# For object, use to_hash. Otherwise, just return the value
|
248
|
+
def _to_hash(value)
|
249
|
+
if value.is_a?(Array)
|
250
|
+
value.compact.map{ |v| _to_hash(v) }
|
251
|
+
elsif value.is_a?(Hash)
|
252
|
+
{}.tap do |hash|
|
253
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
254
|
+
end
|
255
|
+
elsif value.respond_to? :to_hash
|
256
|
+
value.to_hash
|
257
|
+
else
|
258
|
+
value
|
259
|
+
end
|
260
|
+
end
|
261
|
+
|
262
|
+
end
|
263
|
+
end
|