Class: TencentCloud::Sms::V20190711::Client
- Inherits:
-
Common::AbstractClient
- Object
- Common::AbstractClient
- TencentCloud::Sms::V20190711::Client
- Defined in:
- lib/v20190711/client.rb
Instance Method Summary collapse
-
#AddSmsSign(request) ⇒ Object
@rtype: :class:
Tencentcloud::sms::V20190711::AddSmsSignResponse. -
#AddSmsTemplate(request) ⇒ Object
@rtype: :class:
Tencentcloud::sms::V20190711::AddSmsTemplateResponse. -
#CallbackStatusStatistics(request) ⇒ Object
@rtype: :class:
Tencentcloud::sms::V20190711::CallbackStatusStatisticsResponse. -
#DeleteSmsSign(request) ⇒ Object
@rtype: :class:
Tencentcloud::sms::V20190711::DeleteSmsSignResponse. -
#DeleteSmsTemplate(request) ⇒ Object
@rtype: :class:
Tencentcloud::sms::V20190711::DeleteSmsTemplateResponse. -
#DescribeSmsSignList(request) ⇒ Object
@rtype: :class:
Tencentcloud::sms::V20190711::DescribeSmsSignListResponse. -
#DescribeSmsTemplateList(request) ⇒ Object
@rtype: :class:
Tencentcloud::sms::V20190711::DescribeSmsTemplateListResponse. -
#initialize(credential, region, profile = nil) ⇒ Client
constructor
A new instance of Client.
-
#ModifySmsSign(request) ⇒ Object
@rtype: :class:
Tencentcloud::sms::V20190711::ModifySmsSignResponse. -
#ModifySmsTemplate(request) ⇒ Object
@rtype: :class:
Tencentcloud::sms::V20190711::ModifySmsTemplateResponse. -
#PullSmsReplyStatus(request) ⇒ Object
@rtype: :class:
Tencentcloud::sms::V20190711::PullSmsReplyStatusResponse. -
#PullSmsReplyStatusByPhoneNumber(request) ⇒ Object
@rtype: :class:
Tencentcloud::sms::V20190711::PullSmsReplyStatusByPhoneNumberResponse. -
#PullSmsSendStatus(request) ⇒ Object
@rtype: :class:
Tencentcloud::sms::V20190711::PullSmsSendStatusResponse. -
#PullSmsSendStatusByPhoneNumber(request) ⇒ Object
@rtype: :class:
Tencentcloud::sms::V20190711::PullSmsSendStatusByPhoneNumberResponse. -
#SendSms(request) ⇒ Object
@rtype: :class:
Tencentcloud::sms::V20190711::SendSmsResponse. -
#SendStatusStatistics(request) ⇒ Object
@rtype: :class:
Tencentcloud::sms::V20190711::SendStatusStatisticsResponse. -
#SmsPackagesStatistics(request) ⇒ Object
@rtype: :class:
Tencentcloud::sms::V20190711::SmsPackagesStatisticsResponse.
Constructor Details
#initialize(credential, region, profile = nil) ⇒ Client
Returns a new instance of Client.
24 25 26 27 28 29 |
# File 'lib/v20190711/client.rb', line 24 def initialize(credential, region, profile = nil) api_version = '2019-07-11' api_endpoint = 'sms.tencentcloudapi.com' sdk_version = 'SMS_' + File.read(File.('../VERSION', __dir__)).strip super(credential, region, api_version, api_endpoint, sdk_version, profile) end |
Instance Method Details
#AddSmsSign(request) ⇒ Object
@rtype: :class:Tencentcloud::sms::V20190711::AddSmsSignResponse
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/v20190711/client.rb', line 38 def AddSmsSign(request) body = send_request('AddSmsSign', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = AddSmsSignResponse.new model.deserialize(response['Response']) model else code = response['Response']['Error']['Code'] = response['Response']['Error']['Message'] reqid = response['Response']['RequestId'] raise TencentCloud::Common::TencentCloudSDKException.new(code, , reqid) end rescue TencentCloud::Common::TencentCloudSDKException => e raise e rescue StandardError => e raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) end |
#AddSmsTemplate(request) ⇒ Object
@rtype: :class:Tencentcloud::sms::V20190711::AddSmsTemplateResponse
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/v20190711/client.rb', line 63 def AddSmsTemplate(request) body = send_request('AddSmsTemplate', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = AddSmsTemplateResponse.new model.deserialize(response['Response']) model else code = response['Response']['Error']['Code'] = response['Response']['Error']['Message'] reqid = response['Response']['RequestId'] raise TencentCloud::Common::TencentCloudSDKException.new(code, , reqid) end rescue TencentCloud::Common::TencentCloudSDKException => e raise e rescue StandardError => e raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) end |
#CallbackStatusStatistics(request) ⇒ Object
@rtype: :class:Tencentcloud::sms::V20190711::CallbackStatusStatisticsResponse
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
# File 'lib/v20190711/client.rb', line 87 def CallbackStatusStatistics(request) body = send_request('CallbackStatusStatistics', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = CallbackStatusStatisticsResponse.new model.deserialize(response['Response']) model else code = response['Response']['Error']['Code'] = response['Response']['Error']['Message'] reqid = response['Response']['RequestId'] raise TencentCloud::Common::TencentCloudSDKException.new(code, , reqid) end rescue TencentCloud::Common::TencentCloudSDKException => e raise e rescue StandardError => e raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) end |
#DeleteSmsSign(request) ⇒ Object
@rtype: :class:Tencentcloud::sms::V20190711::DeleteSmsSignResponse
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 |
# File 'lib/v20190711/client.rb', line 112 def DeleteSmsSign(request) body = send_request('DeleteSmsSign', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = DeleteSmsSignResponse.new model.deserialize(response['Response']) model else code = response['Response']['Error']['Code'] = response['Response']['Error']['Message'] reqid = response['Response']['RequestId'] raise TencentCloud::Common::TencentCloudSDKException.new(code, , reqid) end rescue TencentCloud::Common::TencentCloudSDKException => e raise e rescue StandardError => e raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) end |
#DeleteSmsTemplate(request) ⇒ Object
@rtype: :class:Tencentcloud::sms::V20190711::DeleteSmsTemplateResponse
137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 |
# File 'lib/v20190711/client.rb', line 137 def DeleteSmsTemplate(request) body = send_request('DeleteSmsTemplate', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = DeleteSmsTemplateResponse.new model.deserialize(response['Response']) model else code = response['Response']['Error']['Code'] = response['Response']['Error']['Message'] reqid = response['Response']['RequestId'] raise TencentCloud::Common::TencentCloudSDKException.new(code, , reqid) end rescue TencentCloud::Common::TencentCloudSDKException => e raise e rescue StandardError => e raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) end |
#DescribeSmsSignList(request) ⇒ Object
@rtype: :class:Tencentcloud::sms::V20190711::DescribeSmsSignListResponse
162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 |
# File 'lib/v20190711/client.rb', line 162 def DescribeSmsSignList(request) body = send_request('DescribeSmsSignList', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = DescribeSmsSignListResponse.new model.deserialize(response['Response']) model else code = response['Response']['Error']['Code'] = response['Response']['Error']['Message'] reqid = response['Response']['RequestId'] raise TencentCloud::Common::TencentCloudSDKException.new(code, , reqid) end rescue TencentCloud::Common::TencentCloudSDKException => e raise e rescue StandardError => e raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) end |
#DescribeSmsTemplateList(request) ⇒ Object
@rtype: :class:Tencentcloud::sms::V20190711::DescribeSmsTemplateListResponse
187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
# File 'lib/v20190711/client.rb', line 187 def DescribeSmsTemplateList(request) body = send_request('DescribeSmsTemplateList', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = DescribeSmsTemplateListResponse.new model.deserialize(response['Response']) model else code = response['Response']['Error']['Code'] = response['Response']['Error']['Message'] reqid = response['Response']['RequestId'] raise TencentCloud::Common::TencentCloudSDKException.new(code, , reqid) end rescue TencentCloud::Common::TencentCloudSDKException => e raise e rescue StandardError => e raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) end |
#ModifySmsSign(request) ⇒ Object
@rtype: :class:Tencentcloud::sms::V20190711::ModifySmsSignResponse
212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 |
# File 'lib/v20190711/client.rb', line 212 def ModifySmsSign(request) body = send_request('ModifySmsSign', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = ModifySmsSignResponse.new model.deserialize(response['Response']) model else code = response['Response']['Error']['Code'] = response['Response']['Error']['Message'] reqid = response['Response']['RequestId'] raise TencentCloud::Common::TencentCloudSDKException.new(code, , reqid) end rescue TencentCloud::Common::TencentCloudSDKException => e raise e rescue StandardError => e raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) end |
#ModifySmsTemplate(request) ⇒ Object
@rtype: :class:Tencentcloud::sms::V20190711::ModifySmsTemplateResponse
237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 |
# File 'lib/v20190711/client.rb', line 237 def ModifySmsTemplate(request) body = send_request('ModifySmsTemplate', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = ModifySmsTemplateResponse.new model.deserialize(response['Response']) model else code = response['Response']['Error']['Code'] = response['Response']['Error']['Message'] reqid = response['Response']['RequestId'] raise TencentCloud::Common::TencentCloudSDKException.new(code, , reqid) end rescue TencentCloud::Common::TencentCloudSDKException => e raise e rescue StandardError => e raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) end |
#PullSmsReplyStatus(request) ⇒ Object
@rtype: :class:Tencentcloud::sms::V20190711::PullSmsReplyStatusResponse
262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 |
# File 'lib/v20190711/client.rb', line 262 def PullSmsReplyStatus(request) body = send_request('PullSmsReplyStatus', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = PullSmsReplyStatusResponse.new model.deserialize(response['Response']) model else code = response['Response']['Error']['Code'] = response['Response']['Error']['Message'] reqid = response['Response']['RequestId'] raise TencentCloud::Common::TencentCloudSDKException.new(code, , reqid) end rescue TencentCloud::Common::TencentCloudSDKException => e raise e rescue StandardError => e raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) end |
#PullSmsReplyStatusByPhoneNumber(request) ⇒ Object
@rtype: :class:Tencentcloud::sms::V20190711::PullSmsReplyStatusByPhoneNumberResponse
287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 |
# File 'lib/v20190711/client.rb', line 287 def PullSmsReplyStatusByPhoneNumber(request) body = send_request('PullSmsReplyStatusByPhoneNumber', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = PullSmsReplyStatusByPhoneNumberResponse.new model.deserialize(response['Response']) model else code = response['Response']['Error']['Code'] = response['Response']['Error']['Message'] reqid = response['Response']['RequestId'] raise TencentCloud::Common::TencentCloudSDKException.new(code, , reqid) end rescue TencentCloud::Common::TencentCloudSDKException => e raise e rescue StandardError => e raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) end |
#PullSmsSendStatus(request) ⇒ Object
@rtype: :class:Tencentcloud::sms::V20190711::PullSmsSendStatusResponse
312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 |
# File 'lib/v20190711/client.rb', line 312 def PullSmsSendStatus(request) body = send_request('PullSmsSendStatus', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = PullSmsSendStatusResponse.new model.deserialize(response['Response']) model else code = response['Response']['Error']['Code'] = response['Response']['Error']['Message'] reqid = response['Response']['RequestId'] raise TencentCloud::Common::TencentCloudSDKException.new(code, , reqid) end rescue TencentCloud::Common::TencentCloudSDKException => e raise e rescue StandardError => e raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) end |
#PullSmsSendStatusByPhoneNumber(request) ⇒ Object
@rtype: :class:Tencentcloud::sms::V20190711::PullSmsSendStatusByPhoneNumberResponse
337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 |
# File 'lib/v20190711/client.rb', line 337 def PullSmsSendStatusByPhoneNumber(request) body = send_request('PullSmsSendStatusByPhoneNumber', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = PullSmsSendStatusByPhoneNumberResponse.new model.deserialize(response['Response']) model else code = response['Response']['Error']['Code'] = response['Response']['Error']['Message'] reqid = response['Response']['RequestId'] raise TencentCloud::Common::TencentCloudSDKException.new(code, , reqid) end rescue TencentCloud::Common::TencentCloudSDKException => e raise e rescue StandardError => e raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) end |
#SendSms(request) ⇒ Object
@rtype: :class:Tencentcloud::sms::V20190711::SendSmsResponse
361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 |
# File 'lib/v20190711/client.rb', line 361 def SendSms(request) body = send_request('SendSms', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = SendSmsResponse.new model.deserialize(response['Response']) model else code = response['Response']['Error']['Code'] = response['Response']['Error']['Message'] reqid = response['Response']['RequestId'] raise TencentCloud::Common::TencentCloudSDKException.new(code, , reqid) end rescue TencentCloud::Common::TencentCloudSDKException => e raise e rescue StandardError => e raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) end |
#SendStatusStatistics(request) ⇒ Object
@rtype: :class:Tencentcloud::sms::V20190711::SendStatusStatisticsResponse
385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 |
# File 'lib/v20190711/client.rb', line 385 def SendStatusStatistics(request) body = send_request('SendStatusStatistics', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = SendStatusStatisticsResponse.new model.deserialize(response['Response']) model else code = response['Response']['Error']['Code'] = response['Response']['Error']['Message'] reqid = response['Response']['RequestId'] raise TencentCloud::Common::TencentCloudSDKException.new(code, , reqid) end rescue TencentCloud::Common::TencentCloudSDKException => e raise e rescue StandardError => e raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) end |
#SmsPackagesStatistics(request) ⇒ Object
@rtype: :class:Tencentcloud::sms::V20190711::SmsPackagesStatisticsResponse
409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 |
# File 'lib/v20190711/client.rb', line 409 def SmsPackagesStatistics(request) body = send_request('SmsPackagesStatistics', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = SmsPackagesStatisticsResponse.new model.deserialize(response['Response']) model else code = response['Response']['Error']['Code'] = response['Response']['Error']['Message'] reqid = response['Response']['RequestId'] raise TencentCloud::Common::TencentCloudSDKException.new(code, , reqid) end rescue TencentCloud::Common::TencentCloudSDKException => e raise e rescue StandardError => e raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) end |