/* * 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.Ic.V20190307 { using Newtonsoft.Json; using System.Threading.Tasks; using TencentCloud.Common; using TencentCloud.Common.Profile; using TencentCloud.Ic.V20190307.Models; public class IcClient : AbstractClient{ private const string endpoint = "ic.tencentcloudapi.com"; private const string version = "2019-03-07"; /// /// Client constructor. /// /// Credentials. /// Region name, such as "ap-guangzhou". public IcClient(Credential credential, string region) : this(credential, region, new ClientProfile()) { } /// /// Client Constructor. /// /// Credentials. /// Region name, such as "ap-guangzhou". /// Client profiles. public IcClient(Credential credential, string region, ClientProfile profile) : base(endpoint, version, credential, region, profile) { } /// /// 根据应用id查询物联卡应用详情 /// /// /// public async Task DescribeApp(DescribeAppRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "DescribeApp"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 根据应用id查询物联卡应用详情 /// /// /// public DescribeAppResponse DescribeAppSync(DescribeAppRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "DescribeApp"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 查询卡片详细信息 /// /// /// public async Task DescribeCard(DescribeCardRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "DescribeCard"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 查询卡片详细信息 /// /// /// public DescribeCardResponse DescribeCardSync(DescribeCardRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "DescribeCard"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 查询卡片列表信息 /// /// /// public async Task DescribeCards(DescribeCardsRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "DescribeCards"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 查询卡片列表信息 /// /// /// public DescribeCardsResponse DescribeCardsSync(DescribeCardsRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "DescribeCards"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 群发短信 /// /// /// public async Task SendMultiSms(SendMultiSmsRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "SendMultiSms"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 群发短信 /// /// /// public SendMultiSmsResponse SendMultiSmsSync(SendMultiSmsRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "SendMultiSms"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 发送短信息接口 /// /// /// public async Task SendSms(SendSmsRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "SendSms"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 发送短信息接口 /// /// /// public SendSmsResponse SendSmsSync(SendSmsRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "SendSms"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } } }