/*
* 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.Partners.V20180321
{
using Newtonsoft.Json;
using System.Threading.Tasks;
using TencentCloud.Common;
using TencentCloud.Common.Profile;
using TencentCloud.Partners.V20180321.Models;
public class PartnersClient : AbstractClient{
private const string endpoint = "partners.tencentcloudapi.com";
private const string version = "2018-03-21";
///
/// Client constructor.
///
/// Credentials.
/// Region name, such as "ap-guangzhou".
public PartnersClient(Credential credential, string region)
: this(credential, region, new ClientProfile())
{
}
///
/// Client Constructor.
///
/// Credentials.
/// Region name, such as "ap-guangzhou".
/// Client profiles.
public PartnersClient(Credential credential, string region, ClientProfile profile)
: base(endpoint, version, credential, region, profile)
{
}
///
/// 代理商支付订单接口,支持自付/代付
///
///
///
public async Task AgentPayDeals(AgentPayDealsRequest req)
{
JsonResponseModel rsp = null;
try
{
var strResp = await this.InternalRequest(req, "AgentPayDeals");
rsp = JsonConvert.DeserializeObject>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
///
/// 代理商支付订单接口,支持自付/代付
///
///
///
public AgentPayDealsResponse AgentPayDealsSync(AgentPayDealsRequest req)
{
JsonResponseModel rsp = null;
try
{
var strResp = this.InternalRequestSync(req, "AgentPayDeals");
rsp = JsonConvert.DeserializeObject>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
///
/// 为合作伙伴提供转账给客户能力。仅支持合作伙伴为自己名下客户转账。
///
///
///
public async Task AgentTransferMoney(AgentTransferMoneyRequest req)
{
JsonResponseModel rsp = null;
try
{
var strResp = await this.InternalRequest(req, "AgentTransferMoney");
rsp = JsonConvert.DeserializeObject>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
///
/// 为合作伙伴提供转账给客户能力。仅支持合作伙伴为自己名下客户转账。
///
///
///
public AgentTransferMoneyResponse AgentTransferMoneySync(AgentTransferMoneyRequest req)
{
JsonResponseModel rsp = null;
try
{
var strResp = this.InternalRequestSync(req, "AgentTransferMoney");
rsp = JsonConvert.DeserializeObject>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
///
/// 代理商可以审核其名下申请中代客
///
///
///
public async Task AuditApplyClient(AuditApplyClientRequest req)
{
JsonResponseModel rsp = null;
try
{
var strResp = await this.InternalRequest(req, "AuditApplyClient");
rsp = JsonConvert.DeserializeObject>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
///
/// 代理商可以审核其名下申请中代客
///
///
///
public AuditApplyClientResponse AuditApplyClientSync(AuditApplyClientRequest req)
{
JsonResponseModel rsp = null;
try
{
var strResp = this.InternalRequestSync(req, "AuditApplyClient");
rsp = JsonConvert.DeserializeObject>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
///
/// 合作伙伴为客户创建强代付关系
///
///
///
public async Task CreatePayRelationForClient(CreatePayRelationForClientRequest req)
{
JsonResponseModel rsp = null;
try
{
var strResp = await this.InternalRequest(req, "CreatePayRelationForClient");
rsp = JsonConvert.DeserializeObject>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
///
/// 合作伙伴为客户创建强代付关系
///
///
///
public CreatePayRelationForClientResponse CreatePayRelationForClientSync(CreatePayRelationForClientRequest req)
{
JsonResponseModel rsp = null;
try
{
var strResp = this.InternalRequestSync(req, "CreatePayRelationForClient");
rsp = JsonConvert.DeserializeObject>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
///
/// 查询已审核客户列表
///
///
///
public async Task DescribeAgentAuditedClients(DescribeAgentAuditedClientsRequest req)
{
JsonResponseModel rsp = null;
try
{
var strResp = await this.InternalRequest(req, "DescribeAgentAuditedClients");
rsp = JsonConvert.DeserializeObject>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
///
/// 查询已审核客户列表
///
///
///
public DescribeAgentAuditedClientsResponse DescribeAgentAuditedClientsSync(DescribeAgentAuditedClientsRequest req)
{
JsonResponseModel rsp = null;
try
{
var strResp = this.InternalRequestSync(req, "DescribeAgentAuditedClients");
rsp = JsonConvert.DeserializeObject>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
///
/// 代理商可查询自己及名下代客所有业务明细
///
///
///
public async Task DescribeAgentBills(DescribeAgentBillsRequest req)
{
JsonResponseModel rsp = null;
try
{
var strResp = await this.InternalRequest(req, "DescribeAgentBills");
rsp = JsonConvert.DeserializeObject>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
///
/// 代理商可查询自己及名下代客所有业务明细
///
///
///
public DescribeAgentBillsResponse DescribeAgentBillsSync(DescribeAgentBillsRequest req)
{
JsonResponseModel rsp = null;
try
{
var strResp = this.InternalRequestSync(req, "DescribeAgentBills");
rsp = JsonConvert.DeserializeObject>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
///
/// 代理商可查询自己名下待审核客户列表
///
///
///
public async Task DescribeAgentClients(DescribeAgentClientsRequest req)
{
JsonResponseModel rsp = null;
try
{
var strResp = await this.InternalRequest(req, "DescribeAgentClients");
rsp = JsonConvert.DeserializeObject>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
///
/// 代理商可查询自己名下待审核客户列表
///
///
///
public DescribeAgentClientsResponse DescribeAgentClientsSync(DescribeAgentClientsRequest req)
{
JsonResponseModel rsp = null;
try
{
var strResp = this.InternalRequestSync(req, "DescribeAgentClients");
rsp = JsonConvert.DeserializeObject>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
///
/// 供超大型代理商(代客数量>=3000 )拉取缓存的全量客户订单。
///
///
///
public async Task DescribeAgentDealsCache(DescribeAgentDealsCacheRequest req)
{
JsonResponseModel rsp = null;
try
{
var strResp = await this.InternalRequest(req, "DescribeAgentDealsCache");
rsp = JsonConvert.DeserializeObject>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
///
/// 供超大型代理商(代客数量>=3000 )拉取缓存的全量客户订单。
///
///
///
public DescribeAgentDealsCacheResponse DescribeAgentDealsCacheSync(DescribeAgentDealsCacheRequest req)
{
JsonResponseModel rsp = null;
try
{
var strResp = this.InternalRequestSync(req, "DescribeAgentDealsCache");
rsp = JsonConvert.DeserializeObject>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
///
/// 可以查询代理商代付的所有订单
///
///
///
public async Task DescribeAgentPayDeals(DescribeAgentPayDealsRequest req)
{
JsonResponseModel rsp = null;
try
{
var strResp = await this.InternalRequest(req, "DescribeAgentPayDeals");
rsp = JsonConvert.DeserializeObject>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
///
/// 可以查询代理商代付的所有订单
///
///
///
public DescribeAgentPayDealsResponse DescribeAgentPayDealsSync(DescribeAgentPayDealsRequest req)
{
JsonResponseModel rsp = null;
try
{
var strResp = this.InternalRequestSync(req, "DescribeAgentPayDeals");
rsp = JsonConvert.DeserializeObject>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
///
/// 为合作伙伴提供查询客户余额能力。调用者必须是合作伙伴,只能查询自己名下客户余额
///
///
///
public async Task DescribeClientBalance(DescribeClientBalanceRequest req)
{
JsonResponseModel rsp = null;
try
{
var strResp = await this.InternalRequest(req, "DescribeClientBalance");
rsp = JsonConvert.DeserializeObject>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
///
/// 为合作伙伴提供查询客户余额能力。调用者必须是合作伙伴,只能查询自己名下客户余额
///
///
///
public DescribeClientBalanceResponse DescribeClientBalanceSync(DescribeClientBalanceRequest req)
{
JsonResponseModel rsp = null;
try
{
var strResp = this.InternalRequestSync(req, "DescribeClientBalance");
rsp = JsonConvert.DeserializeObject>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
///
/// 代理商可查询自己名下全部返佣信息
///
///
///
public async Task DescribeRebateInfos(DescribeRebateInfosRequest req)
{
JsonResponseModel rsp = null;
try
{
var strResp = await this.InternalRequest(req, "DescribeRebateInfos");
rsp = JsonConvert.DeserializeObject>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
///
/// 代理商可查询自己名下全部返佣信息
///
///
///
public DescribeRebateInfosResponse DescribeRebateInfosSync(DescribeRebateInfosRequest req)
{
JsonResponseModel rsp = null;
try
{
var strResp = this.InternalRequestSync(req, "DescribeRebateInfos");
rsp = JsonConvert.DeserializeObject>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
///
/// 代理商查询名下业务员列表信息
///
///
///
public async Task DescribeSalesmans(DescribeSalesmansRequest req)
{
JsonResponseModel rsp = null;
try
{
var strResp = await this.InternalRequest(req, "DescribeSalesmans");
rsp = JsonConvert.DeserializeObject>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
///
/// 代理商查询名下业务员列表信息
///
///
///
public DescribeSalesmansResponse DescribeSalesmansSync(DescribeSalesmansRequest req)
{
JsonResponseModel rsp = null;
try
{
var strResp = this.InternalRequestSync(req, "DescribeSalesmans");
rsp = JsonConvert.DeserializeObject>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
///
/// 代理商可以对名下客户添加备注、修改备注
///
///
///
public async Task ModifyClientRemark(ModifyClientRemarkRequest req)
{
JsonResponseModel rsp = null;
try
{
var strResp = await this.InternalRequest(req, "ModifyClientRemark");
rsp = JsonConvert.DeserializeObject>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
///
/// 代理商可以对名下客户添加备注、修改备注
///
///
///
public ModifyClientRemarkResponse ModifyClientRemarkSync(ModifyClientRemarkRequest req)
{
JsonResponseModel rsp = null;
try
{
var strResp = this.InternalRequestSync(req, "ModifyClientRemark");
rsp = JsonConvert.DeserializeObject>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
///
/// 合作伙伴为客户消除强代付关系
///
///
///
public async Task RemovePayRelationForClient(RemovePayRelationForClientRequest req)
{
JsonResponseModel rsp = null;
try
{
var strResp = await this.InternalRequest(req, "RemovePayRelationForClient");
rsp = JsonConvert.DeserializeObject>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
///
/// 合作伙伴为客户消除强代付关系
///
///
///
public RemovePayRelationForClientResponse RemovePayRelationForClientSync(RemovePayRelationForClientRequest req)
{
JsonResponseModel rsp = null;
try
{
var strResp = this.InternalRequestSync(req, "RemovePayRelationForClient");
rsp = JsonConvert.DeserializeObject>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
}
}