Class: TencentCloud::Ses::V20201002::Client

Inherits:
Common::AbstractClient
  • Object
show all
Defined in:
lib/v20201002/client.rb

Instance Method Summary collapse

Constructor Details

#initialize(credential, region, profile = nil) ⇒ Client

Returns a new instance of Client.



24
25
26
27
28
29
# File 'lib/v20201002/client.rb', line 24

def initialize(credential, region, profile = nil)
    api_version = '2020-10-02'
    api_endpoint = 'ses.tencentcloudapi.com'
    sdk_version = 'SES_' + File.read(File.expand_path('../VERSION', __dir__)).strip
    super(credential, region, api_version, api_endpoint, sdk_version, profile)
end

Instance Method Details

#BatchSendEmail(request) ⇒ Object

@rtype: :class:Tencentcloud::ses::V20201002::BatchSendEmailResponse

Parameters:

  • request:

    Request instance for BatchSendEmail.



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# File 'lib/v20201002/client.rb', line 37

def BatchSendEmail(request)
  body = send_request('BatchSendEmail', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = BatchSendEmailResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#CreateAddressUnsubscribeConfig(request) ⇒ Object

@rtype: :class:Tencentcloud::ses::V20201002::CreateAddressUnsubscribeConfigResponse

Parameters:

  • request:

    Request instance for CreateAddressUnsubscribeConfig.



61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# File 'lib/v20201002/client.rb', line 61

def CreateAddressUnsubscribeConfig(request)
  body = send_request('CreateAddressUnsubscribeConfig', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = CreateAddressUnsubscribeConfigResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#CreateCustomBlacklist(request) ⇒ Object

@rtype: :class:Tencentcloud::ses::V20201002::CreateCustomBlacklistResponse

Parameters:

  • request:

    Request instance for CreateCustomBlacklist.



85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# File 'lib/v20201002/client.rb', line 85

def CreateCustomBlacklist(request)
  body = send_request('CreateCustomBlacklist', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = CreateCustomBlacklistResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#CreateEmailAddress(request) ⇒ Object

@rtype: :class:Tencentcloud::ses::V20201002::CreateEmailAddressResponse

Parameters:

  • request:

    Request instance for CreateEmailAddress.



109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# File 'lib/v20201002/client.rb', line 109

def CreateEmailAddress(request)
  body = send_request('CreateEmailAddress', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = CreateEmailAddressResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#CreateEmailIdentity(request) ⇒ Object

@rtype: :class:Tencentcloud::ses::V20201002::CreateEmailIdentityResponse

Parameters:

  • request:

    Request instance for CreateEmailIdentity.



133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
# File 'lib/v20201002/client.rb', line 133

def CreateEmailIdentity(request)
  body = send_request('CreateEmailIdentity', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = CreateEmailIdentityResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#CreateEmailTemplate(request) ⇒ Object

@rtype: :class:Tencentcloud::ses::V20201002::CreateEmailTemplateResponse

Parameters:

  • request:

    Request instance for CreateEmailTemplate.



158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
# File 'lib/v20201002/client.rb', line 158

def CreateEmailTemplate(request)
  body = send_request('CreateEmailTemplate', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = CreateEmailTemplateResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#CreateReceiver(request) ⇒ Object

@rtype: :class:Tencentcloud::ses::V20201002::CreateReceiverResponse

Parameters:

  • request:

    Request instance for CreateReceiver.



182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
# File 'lib/v20201002/client.rb', line 182

def CreateReceiver(request)
  body = send_request('CreateReceiver', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = CreateReceiverResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#CreateReceiverDetail(request) ⇒ Object

@rtype: :class:Tencentcloud::ses::V20201002::CreateReceiverDetailResponse

Parameters:

  • request:

    Request instance for CreateReceiverDetail.



206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
# File 'lib/v20201002/client.rb', line 206

def CreateReceiverDetail(request)
  body = send_request('CreateReceiverDetail', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = CreateReceiverDetailResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#CreateReceiverDetailWithData(request) ⇒ Object

@rtype: :class:Tencentcloud::ses::V20201002::CreateReceiverDetailWithDataResponse

Parameters:

  • request:

    Request instance for CreateReceiverDetailWithData.



230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
# File 'lib/v20201002/client.rb', line 230

def CreateReceiverDetailWithData(request)
  body = send_request('CreateReceiverDetailWithData', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = CreateReceiverDetailWithDataResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#DeleteAddressUnsubscribeConfig(request) ⇒ Object

@rtype: :class:Tencentcloud::ses::V20201002::DeleteAddressUnsubscribeConfigResponse

Parameters:

  • request:

    Request instance for DeleteAddressUnsubscribeConfig.



254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
# File 'lib/v20201002/client.rb', line 254

def DeleteAddressUnsubscribeConfig(request)
  body = send_request('DeleteAddressUnsubscribeConfig', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = DeleteAddressUnsubscribeConfigResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#DeleteBlackList(request) ⇒ Object

@rtype: :class:Tencentcloud::ses::V20201002::DeleteBlackListResponse

Parameters:

  • request:

    Request instance for DeleteBlackList.



278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
# File 'lib/v20201002/client.rb', line 278

def DeleteBlackList(request)
  body = send_request('DeleteBlackList', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = DeleteBlackListResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#DeleteCustomBlackList(request) ⇒ Object

@rtype: :class:Tencentcloud::ses::V20201002::DeleteCustomBlackListResponse

Parameters:

  • request:

    Request instance for DeleteCustomBlackList.



302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
# File 'lib/v20201002/client.rb', line 302

def DeleteCustomBlackList(request)
  body = send_request('DeleteCustomBlackList', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = DeleteCustomBlackListResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#DeleteEmailAddress(request) ⇒ Object

@rtype: :class:Tencentcloud::ses::V20201002::DeleteEmailAddressResponse

Parameters:

  • request:

    Request instance for DeleteEmailAddress.



326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
# File 'lib/v20201002/client.rb', line 326

def DeleteEmailAddress(request)
  body = send_request('DeleteEmailAddress', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = DeleteEmailAddressResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#DeleteEmailIdentity(request) ⇒ Object

@rtype: :class:Tencentcloud::ses::V20201002::DeleteEmailIdentityResponse

Parameters:

  • request:

    Request instance for DeleteEmailIdentity.



350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
# File 'lib/v20201002/client.rb', line 350

def DeleteEmailIdentity(request)
  body = send_request('DeleteEmailIdentity', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = DeleteEmailIdentityResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#DeleteEmailTemplate(request) ⇒ Object

@rtype: :class:Tencentcloud::ses::V20201002::DeleteEmailTemplateResponse

Parameters:

  • request:

    Request instance for DeleteEmailTemplate.



374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
# File 'lib/v20201002/client.rb', line 374

def DeleteEmailTemplate(request)
  body = send_request('DeleteEmailTemplate', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = DeleteEmailTemplateResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#DeleteReceiver(request) ⇒ Object

@rtype: :class:Tencentcloud::ses::V20201002::DeleteReceiverResponse

Parameters:

  • request:

    Request instance for DeleteReceiver.



398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
# File 'lib/v20201002/client.rb', line 398

def DeleteReceiver(request)
  body = send_request('DeleteReceiver', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = DeleteReceiverResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#GetEmailIdentity(request) ⇒ Object

@rtype: :class:Tencentcloud::ses::V20201002::GetEmailIdentityResponse

Parameters:

  • request:

    Request instance for GetEmailIdentity.



422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
# File 'lib/v20201002/client.rb', line 422

def GetEmailIdentity(request)
  body = send_request('GetEmailIdentity', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = GetEmailIdentityResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#GetEmailTemplate(request) ⇒ Object

@rtype: :class:Tencentcloud::ses::V20201002::GetEmailTemplateResponse

Parameters:

  • request:

    Request instance for GetEmailTemplate.



446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
# File 'lib/v20201002/client.rb', line 446

def GetEmailTemplate(request)
  body = send_request('GetEmailTemplate', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = GetEmailTemplateResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#GetSendEmailStatus(request) ⇒ Object

@rtype: :class:Tencentcloud::ses::V20201002::GetSendEmailStatusResponse

Parameters:

  • request:

    Request instance for GetSendEmailStatus.



470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
# File 'lib/v20201002/client.rb', line 470

def GetSendEmailStatus(request)
  body = send_request('GetSendEmailStatus', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = GetSendEmailStatusResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#GetStatisticsReport(request) ⇒ Object

@rtype: :class:Tencentcloud::ses::V20201002::GetStatisticsReportResponse

Parameters:

  • request:

    Request instance for GetStatisticsReport.



494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
# File 'lib/v20201002/client.rb', line 494

def GetStatisticsReport(request)
  body = send_request('GetStatisticsReport', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = GetStatisticsReportResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#ListAddressUnsubscribeConfig(request) ⇒ Object

@rtype: :class:Tencentcloud::ses::V20201002::ListAddressUnsubscribeConfigResponse

Parameters:

  • request:

    Request instance for ListAddressUnsubscribeConfig.



518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
# File 'lib/v20201002/client.rb', line 518

def ListAddressUnsubscribeConfig(request)
  body = send_request('ListAddressUnsubscribeConfig', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = ListAddressUnsubscribeConfigResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#ListBlackEmailAddress(request) ⇒ Object

@rtype: :class:Tencentcloud::ses::V20201002::ListBlackEmailAddressResponse

Parameters:

  • request:

    Request instance for ListBlackEmailAddress.



542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
# File 'lib/v20201002/client.rb', line 542

def ListBlackEmailAddress(request)
  body = send_request('ListBlackEmailAddress', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = ListBlackEmailAddressResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#ListCustomBlacklist(request) ⇒ Object

@rtype: :class:Tencentcloud::ses::V20201002::ListCustomBlacklistResponse

Parameters:

  • request:

    Request instance for ListCustomBlacklist.



566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
# File 'lib/v20201002/client.rb', line 566

def ListCustomBlacklist(request)
  body = send_request('ListCustomBlacklist', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = ListCustomBlacklistResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#ListEmailAddress(request) ⇒ Object

@rtype: :class:Tencentcloud::ses::V20201002::ListEmailAddressResponse

Parameters:

  • request:

    Request instance for ListEmailAddress.



590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
# File 'lib/v20201002/client.rb', line 590

def ListEmailAddress(request)
  body = send_request('ListEmailAddress', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = ListEmailAddressResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#ListEmailIdentities(request) ⇒ Object

@rtype: :class:Tencentcloud::ses::V20201002::ListEmailIdentitiesResponse

Parameters:

  • request:

    Request instance for ListEmailIdentities.



614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
# File 'lib/v20201002/client.rb', line 614

def ListEmailIdentities(request)
  body = send_request('ListEmailIdentities', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = ListEmailIdentitiesResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#ListEmailTemplates(request) ⇒ Object

@rtype: :class:Tencentcloud::ses::V20201002::ListEmailTemplatesResponse

Parameters:

  • request:

    Request instance for ListEmailTemplates.



638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
# File 'lib/v20201002/client.rb', line 638

def ListEmailTemplates(request)
  body = send_request('ListEmailTemplates', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = ListEmailTemplatesResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#ListReceiverDetails(request) ⇒ Object

@rtype: :class:Tencentcloud::ses::V20201002::ListReceiverDetailsResponse

Parameters:

  • request:

    Request instance for ListReceiverDetails.



662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
# File 'lib/v20201002/client.rb', line 662

def ListReceiverDetails(request)
  body = send_request('ListReceiverDetails', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = ListReceiverDetailsResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#ListReceivers(request) ⇒ Object

@rtype: :class:Tencentcloud::ses::V20201002::ListReceiversResponse

Parameters:

  • request:

    Request instance for ListReceivers.



686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
# File 'lib/v20201002/client.rb', line 686

def ListReceivers(request)
  body = send_request('ListReceivers', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = ListReceiversResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#ListSendTasks(request) ⇒ Object

@rtype: :class:Tencentcloud::ses::V20201002::ListSendTasksResponse

Parameters:

  • request:

    Request instance for ListSendTasks.



710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
# File 'lib/v20201002/client.rb', line 710

def ListSendTasks(request)
  body = send_request('ListSendTasks', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = ListSendTasksResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#SendEmail(request) ⇒ Object

@rtype: :class:Tencentcloud::ses::V20201002::SendEmailResponse

Parameters:

  • request:

    Request instance for SendEmail.



734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
# File 'lib/v20201002/client.rb', line 734

def SendEmail(request)
  body = send_request('SendEmail', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = SendEmailResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#UpdateAddressUnsubscribeConfig(request) ⇒ Object

@rtype: :class:Tencentcloud::ses::V20201002::UpdateAddressUnsubscribeConfigResponse

Parameters:

  • request:

    Request instance for UpdateAddressUnsubscribeConfig.



758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
# File 'lib/v20201002/client.rb', line 758

def UpdateAddressUnsubscribeConfig(request)
  body = send_request('UpdateAddressUnsubscribeConfig', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = UpdateAddressUnsubscribeConfigResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#UpdateCustomBlackList(request) ⇒ Object

@rtype: :class:Tencentcloud::ses::V20201002::UpdateCustomBlackListResponse

Parameters:

  • request:

    Request instance for UpdateCustomBlackList.



782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
# File 'lib/v20201002/client.rb', line 782

def UpdateCustomBlackList(request)
  body = send_request('UpdateCustomBlackList', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = UpdateCustomBlackListResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#UpdateEmailIdentity(request) ⇒ Object

@rtype: :class:Tencentcloud::ses::V20201002::UpdateEmailIdentityResponse

Parameters:

  • request:

    Request instance for UpdateEmailIdentity.



806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
# File 'lib/v20201002/client.rb', line 806

def UpdateEmailIdentity(request)
  body = send_request('UpdateEmailIdentity', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = UpdateEmailIdentityResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#UpdateEmailSmtpPassWord(request) ⇒ Object

@rtype: :class:Tencentcloud::ses::V20201002::UpdateEmailSmtpPassWordResponse

Parameters:

  • request:

    Request instance for UpdateEmailSmtpPassWord.



830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
# File 'lib/v20201002/client.rb', line 830

def UpdateEmailSmtpPassWord(request)
  body = send_request('UpdateEmailSmtpPassWord', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = UpdateEmailSmtpPassWordResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#UpdateEmailTemplate(request) ⇒ Object

@rtype: :class:Tencentcloud::ses::V20201002::UpdateEmailTemplateResponse

Parameters:

  • request:

    Request instance for UpdateEmailTemplate.



854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
# File 'lib/v20201002/client.rb', line 854

def UpdateEmailTemplate(request)
  body = send_request('UpdateEmailTemplate', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = UpdateEmailTemplateResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end