/* * Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ namespace TencentCloud.Cr.V20180321 { using Newtonsoft.Json; using System.Threading.Tasks; using TencentCloud.Common; using TencentCloud.Common.Profile; using TencentCloud.Cr.V20180321.Models; public class CrClient : AbstractClient{ private const string endpoint = "cr.tencentcloudapi.com"; private const string version = "2018-03-21"; /// /// Client constructor. /// /// Credentials. /// Region name, such as "ap-guangzhou". public CrClient(Credential credential, string region) : this(credential, region, new ClientProfile()) { } /// /// Client Constructor. /// /// Credentials. /// Region name, such as "ap-guangzhou". /// Client profiles. public CrClient(Credential credential, string region, ClientProfile profile) : base(endpoint, version, credential, region, profile) { } /// /// 提交黑名单后,黑名单中有效期内的号码将停止拨打,适用于到期/逾期提醒、回访场景。 /// /// /// public async Task ApplyBlackList(ApplyBlackListRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "ApplyBlackList"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 提交黑名单后,黑名单中有效期内的号码将停止拨打,适用于到期/逾期提醒、回访场景。 /// /// /// public ApplyBlackListResponse ApplyBlackListSync(ApplyBlackListRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "ApplyBlackList"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 提交信审外呼申请,返回当次请求日期。 /// /// /// public async Task ApplyCreditAudit(ApplyCreditAuditRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "ApplyCreditAudit"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 提交信审外呼申请,返回当次请求日期。 /// /// /// public ApplyCreditAuditResponse ApplyCreditAuditSync(ApplyCreditAuditRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "ApplyCreditAudit"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 根据信审任务ID和请求日期,获取相关信审结果。 /// /// /// public async Task DescribeCreditResult(DescribeCreditResultRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "DescribeCreditResult"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 根据信审任务ID和请求日期,获取相关信审结果。 /// /// /// public DescribeCreditResultResponse DescribeCreditResultSync(DescribeCreditResultRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "DescribeCreditResult"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 用于获取指定案件的录音地址,次日早上8:00后可查询前日录音。 /// /// /// public async Task DescribeRecords(DescribeRecordsRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "DescribeRecords"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 用于获取指定案件的录音地址,次日早上8:00后可查询前日录音。 /// /// /// public DescribeRecordsResponse DescribeRecordsSync(DescribeRecordsRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "DescribeRecords"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 根据上传文件接口的输出参数DataResId,获取相关上传结果。 /// /// /// public async Task DescribeTaskStatus(DescribeTaskStatusRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "DescribeTaskStatus"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 根据上传文件接口的输出参数DataResId,获取相关上传结果。 /// /// /// public DescribeTaskStatusResponse DescribeTaskStatusSync(DescribeTaskStatusRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "DescribeTaskStatus"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 用于获取指定案件的对话文本内容,次日早上8:00后可查询前日对话文本内容。 /// /// /// public async Task DownloadDialogueText(DownloadDialogueTextRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "DownloadDialogueText"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 用于获取指定案件的对话文本内容,次日早上8:00后可查询前日对话文本内容。 /// /// /// public DownloadDialogueTextResponse DownloadDialogueTextSync(DownloadDialogueTextRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "DownloadDialogueText"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// ///

用于获取录音下载链接清单,次日早上8:00后可查询前日录音清单。

///

注意:录音清单中的录音下载链接仅次日20:00之前有效,请及时下载。

///
/// /// public async Task DownloadRecordList(DownloadRecordListRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "DownloadRecordList"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// ///

用于获取录音下载链接清单,次日早上8:00后可查询前日录音清单。

///

注意:录音清单中的录音下载链接仅次日20:00之前有效,请及时下载。

///
/// /// public DownloadRecordListResponse DownloadRecordListSync(DownloadRecordListRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "DownloadRecordList"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 用于下载结果报表。当日23:00后,可获取当日到期/逾期提醒结果,次日00:30后,可获取昨日回访结果。 /// /// /// public async Task DownloadReport(DownloadReportRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "DownloadReport"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 用于下载结果报表。当日23:00后,可获取当日到期/逾期提醒结果,次日00:30后,可获取昨日回访结果。 /// /// /// public DownloadReportResponse DownloadReportSync(DownloadReportRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "DownloadReport"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 实时数据查询 /// /// /// public async Task QueryInstantData(QueryInstantDataRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "QueryInstantData"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 实时数据查询 /// /// /// public QueryInstantDataResponse QueryInstantDataSync(QueryInstantDataRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "QueryInstantData"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 上传文件,接口返回数据任务ID,支持xlsx、xls、csv、zip格式。 /// /// /// public async Task UploadDataFile(UploadDataFileRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "UploadDataFile"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 上传文件,接口返回数据任务ID,支持xlsx、xls、csv、zip格式。 /// /// /// public UploadDataFileResponse UploadDataFileSync(UploadDataFileRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "UploadDataFile"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 上传Json格式数据,接口返回数据任务ID /// /// /// public async Task UploadDataJson(UploadDataJsonRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "UploadDataJson"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 上传Json格式数据,接口返回数据任务ID /// /// /// public UploadDataJsonResponse UploadDataJsonSync(UploadDataJsonRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "UploadDataJson"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 客户通过调用该接口上传需催收文档,格式需为excel格式。接口返回任务ID。 /// /// /// public async Task UploadFile(UploadFileRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "UploadFile"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 客户通过调用该接口上传需催收文档,格式需为excel格式。接口返回任务ID。 /// /// /// public UploadFileResponse UploadFileSync(UploadFileRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "UploadFile"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } } }