tencentcloud-sdk-ses 1.0.200

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: f502db041d32264a961a5976e10f56e8deda38b4
4
+ data.tar.gz: 535bc8c8422078d0ecc2e017119acda5416dedfa
5
+ SHA512:
6
+ metadata.gz: 4319feeb039e15b0fa03f253cd36de391463990b3e450e8e56d7248f0623179e09fdd3e4e2be4133ede6d80836a8895f1f07f187a4197f94486aec623563bc58
7
+ data.tar.gz: 6c41febda5a1c6e793ab8976719429ee361bfe4562b0b595c67dad4c72ea5ca797d52ff25b3efd0f4e97fb3761fe89b52383658b4b6a33d76c268cc4b7f26d76
data/lib/VERSION ADDED
@@ -0,0 +1 @@
1
+ 1.0.200
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'tencentcloud-sdk-common'
4
+
5
+ require_relative 'v20201002/client'
6
+ require_relative 'v20201002/models'
7
+
8
+ module TencentCloud
9
+ module Ses
10
+ end
11
+ end
@@ -0,0 +1,493 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved.
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ require 'json'
18
+
19
+ module TencentCloud
20
+ module Ses
21
+ module V20201002
22
+ class Client < TencentCloud::Common::AbstractClient
23
+
24
+ def initialize(credential, region, profile = nil)
25
+ api_version = '2020-10-02'
26
+ api_endpoint = 'ses.tencentcloudapi.com'
27
+ sdk_version = 'SES_' + File.read(File.expand_path('../VERSION', __dir__)).strip
28
+ super(credential, region, api_version, api_endpoint, sdk_version, profile)
29
+ end
30
+
31
+
32
+ # 您可以通过此API批量发送TEXT或者HTML邮件,适用于营销类、通知类邮件。默认仅支持使用模板发送邮件,如需发送自定义内容,请单独联系商务开通此功能。批量发送之前,需先创建收件人列表,和收件人地址,并通过收件人列表id来进行发送。批量发送任务支持定时发送和周期重复发送,定时发送需传TimedParam,周期重复发送需传CycleParam
33
+
34
+ # @param request: Request instance for BatchSendEmail.
35
+ # @type request: :class:`Tencentcloud::ses::V20201002::BatchSendEmailRequest`
36
+ # @rtype: :class:`Tencentcloud::ses::V20201002::BatchSendEmailResponse`
37
+ def BatchSendEmail(request)
38
+ body = send_request('BatchSendEmail', request.serialize)
39
+ response = JSON.parse(body)
40
+ if response['Response'].key?('Error') == false
41
+ model = BatchSendEmailResponse.new
42
+ model.deserialize(response['Response'])
43
+ model
44
+ else
45
+ code = response['Response']['Error']['Code']
46
+ message = response['Response']['Error']['Message']
47
+ reqid = response['Response']['RequestId']
48
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
49
+ end
50
+ rescue TencentCloud::Common::TencentCloudSDKException => e
51
+ raise e
52
+ rescue StandardError => e
53
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
54
+ end
55
+
56
+ # 在验证了发信域名之后,您需要一个发信地址来发送邮件。例如发信域名是mail.qcloud.com,那么发信地址可以为 service@mail.qcloud.com。如果您想要收件人在收件箱列表中显示您的别名,例如"腾讯云邮件通知"。那么发信地址为: 别名 空格 尖括号 邮箱地址。请注意中间需要有空格
57
+
58
+ # @param request: Request instance for CreateEmailAddress.
59
+ # @type request: :class:`Tencentcloud::ses::V20201002::CreateEmailAddressRequest`
60
+ # @rtype: :class:`Tencentcloud::ses::V20201002::CreateEmailAddressResponse`
61
+ def CreateEmailAddress(request)
62
+ body = send_request('CreateEmailAddress', request.serialize)
63
+ response = JSON.parse(body)
64
+ if response['Response'].key?('Error') == false
65
+ model = CreateEmailAddressResponse.new
66
+ model.deserialize(response['Response'])
67
+ model
68
+ else
69
+ code = response['Response']['Error']['Code']
70
+ message = response['Response']['Error']['Message']
71
+ reqid = response['Response']['RequestId']
72
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
73
+ end
74
+ rescue TencentCloud::Common::TencentCloudSDKException => e
75
+ raise e
76
+ rescue StandardError => e
77
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
78
+ end
79
+
80
+ # 在使用身份发送电子邮件之前,您需要有一个电子邮件域名,该域名可以是您的网站或者移动应用的域名。您首先必须进行验证,证明自己是该域名的所有者,并且授权给腾讯云SES发送许可,才可以从该域名发送电子邮件。
81
+
82
+ # @param request: Request instance for CreateEmailIdentity.
83
+ # @type request: :class:`Tencentcloud::ses::V20201002::CreateEmailIdentityRequest`
84
+ # @rtype: :class:`Tencentcloud::ses::V20201002::CreateEmailIdentityResponse`
85
+ def CreateEmailIdentity(request)
86
+ body = send_request('CreateEmailIdentity', request.serialize)
87
+ response = JSON.parse(body)
88
+ if response['Response'].key?('Error') == false
89
+ model = CreateEmailIdentityResponse.new
90
+ model.deserialize(response['Response'])
91
+ model
92
+ else
93
+ code = response['Response']['Error']['Code']
94
+ message = response['Response']['Error']['Message']
95
+ reqid = response['Response']['RequestId']
96
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
97
+ end
98
+ rescue TencentCloud::Common::TencentCloudSDKException => e
99
+ raise e
100
+ rescue StandardError => e
101
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
102
+ end
103
+
104
+ # 创建模板,该模板可以是TXT或者HTML,请注意如果HTML不要包含外部文件的CSS。模板中的变量使用 {{变量名}} 表示。
105
+ # 注意:模版需要审核通过才可以使用。
106
+
107
+ # @param request: Request instance for CreateEmailTemplate.
108
+ # @type request: :class:`Tencentcloud::ses::V20201002::CreateEmailTemplateRequest`
109
+ # @rtype: :class:`Tencentcloud::ses::V20201002::CreateEmailTemplateResponse`
110
+ def CreateEmailTemplate(request)
111
+ body = send_request('CreateEmailTemplate', request.serialize)
112
+ response = JSON.parse(body)
113
+ if response['Response'].key?('Error') == false
114
+ model = CreateEmailTemplateResponse.new
115
+ model.deserialize(response['Response'])
116
+ model
117
+ else
118
+ code = response['Response']['Error']['Code']
119
+ message = response['Response']['Error']['Message']
120
+ reqid = response['Response']['RequestId']
121
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
122
+ end
123
+ rescue TencentCloud::Common::TencentCloudSDKException => e
124
+ raise e
125
+ rescue StandardError => e
126
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
127
+ end
128
+
129
+ # 邮箱被拉黑之后,用户如果确认收件邮箱有效或者已经处于激活状态,可以从腾讯云地址库中删除该黑名单之后继续投递。
130
+
131
+ # @param request: Request instance for DeleteBlackList.
132
+ # @type request: :class:`Tencentcloud::ses::V20201002::DeleteBlackListRequest`
133
+ # @rtype: :class:`Tencentcloud::ses::V20201002::DeleteBlackListResponse`
134
+ def DeleteBlackList(request)
135
+ body = send_request('DeleteBlackList', request.serialize)
136
+ response = JSON.parse(body)
137
+ if response['Response'].key?('Error') == false
138
+ model = DeleteBlackListResponse.new
139
+ model.deserialize(response['Response'])
140
+ model
141
+ else
142
+ code = response['Response']['Error']['Code']
143
+ message = response['Response']['Error']['Message']
144
+ reqid = response['Response']['RequestId']
145
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
146
+ end
147
+ rescue TencentCloud::Common::TencentCloudSDKException => e
148
+ raise e
149
+ rescue StandardError => e
150
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
151
+ end
152
+
153
+ # 删除发信人地址
154
+
155
+ # @param request: Request instance for DeleteEmailAddress.
156
+ # @type request: :class:`Tencentcloud::ses::V20201002::DeleteEmailAddressRequest`
157
+ # @rtype: :class:`Tencentcloud::ses::V20201002::DeleteEmailAddressResponse`
158
+ def DeleteEmailAddress(request)
159
+ body = send_request('DeleteEmailAddress', request.serialize)
160
+ response = JSON.parse(body)
161
+ if response['Response'].key?('Error') == false
162
+ model = DeleteEmailAddressResponse.new
163
+ model.deserialize(response['Response'])
164
+ model
165
+ else
166
+ code = response['Response']['Error']['Code']
167
+ message = response['Response']['Error']['Message']
168
+ reqid = response['Response']['RequestId']
169
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
170
+ end
171
+ rescue TencentCloud::Common::TencentCloudSDKException => e
172
+ raise e
173
+ rescue StandardError => e
174
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
175
+ end
176
+
177
+ # 删除发信域名,删除后,将不可再使用该域名进行发信
178
+
179
+ # @param request: Request instance for DeleteEmailIdentity.
180
+ # @type request: :class:`Tencentcloud::ses::V20201002::DeleteEmailIdentityRequest`
181
+ # @rtype: :class:`Tencentcloud::ses::V20201002::DeleteEmailIdentityResponse`
182
+ def DeleteEmailIdentity(request)
183
+ body = send_request('DeleteEmailIdentity', request.serialize)
184
+ response = JSON.parse(body)
185
+ if response['Response'].key?('Error') == false
186
+ model = DeleteEmailIdentityResponse.new
187
+ model.deserialize(response['Response'])
188
+ model
189
+ else
190
+ code = response['Response']['Error']['Code']
191
+ message = response['Response']['Error']['Message']
192
+ reqid = response['Response']['RequestId']
193
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
194
+ end
195
+ rescue TencentCloud::Common::TencentCloudSDKException => e
196
+ raise e
197
+ rescue StandardError => e
198
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
199
+ end
200
+
201
+ # 删除发信模版
202
+
203
+ # @param request: Request instance for DeleteEmailTemplate.
204
+ # @type request: :class:`Tencentcloud::ses::V20201002::DeleteEmailTemplateRequest`
205
+ # @rtype: :class:`Tencentcloud::ses::V20201002::DeleteEmailTemplateResponse`
206
+ def DeleteEmailTemplate(request)
207
+ body = send_request('DeleteEmailTemplate', request.serialize)
208
+ response = JSON.parse(body)
209
+ if response['Response'].key?('Error') == false
210
+ model = DeleteEmailTemplateResponse.new
211
+ model.deserialize(response['Response'])
212
+ model
213
+ else
214
+ code = response['Response']['Error']['Code']
215
+ message = response['Response']['Error']['Message']
216
+ reqid = response['Response']['RequestId']
217
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
218
+ end
219
+ rescue TencentCloud::Common::TencentCloudSDKException => e
220
+ raise e
221
+ rescue StandardError => e
222
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
223
+ end
224
+
225
+ # 获取某个发信域名的配置详情
226
+
227
+ # @param request: Request instance for GetEmailIdentity.
228
+ # @type request: :class:`Tencentcloud::ses::V20201002::GetEmailIdentityRequest`
229
+ # @rtype: :class:`Tencentcloud::ses::V20201002::GetEmailIdentityResponse`
230
+ def GetEmailIdentity(request)
231
+ body = send_request('GetEmailIdentity', request.serialize)
232
+ response = JSON.parse(body)
233
+ if response['Response'].key?('Error') == false
234
+ model = GetEmailIdentityResponse.new
235
+ model.deserialize(response['Response'])
236
+ model
237
+ else
238
+ code = response['Response']['Error']['Code']
239
+ message = response['Response']['Error']['Message']
240
+ reqid = response['Response']['RequestId']
241
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
242
+ end
243
+ rescue TencentCloud::Common::TencentCloudSDKException => e
244
+ raise e
245
+ rescue StandardError => e
246
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
247
+ end
248
+
249
+ # 根据模板ID获取模板详情
250
+
251
+ # @param request: Request instance for GetEmailTemplate.
252
+ # @type request: :class:`Tencentcloud::ses::V20201002::GetEmailTemplateRequest`
253
+ # @rtype: :class:`Tencentcloud::ses::V20201002::GetEmailTemplateResponse`
254
+ def GetEmailTemplate(request)
255
+ body = send_request('GetEmailTemplate', request.serialize)
256
+ response = JSON.parse(body)
257
+ if response['Response'].key?('Error') == false
258
+ model = GetEmailTemplateResponse.new
259
+ model.deserialize(response['Response'])
260
+ model
261
+ else
262
+ code = response['Response']['Error']['Code']
263
+ message = response['Response']['Error']['Message']
264
+ reqid = response['Response']['RequestId']
265
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
266
+ end
267
+ rescue TencentCloud::Common::TencentCloudSDKException => e
268
+ raise e
269
+ rescue StandardError => e
270
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
271
+ end
272
+
273
+ # 获取邮件发送状态。仅支持查询90天之内的数据
274
+
275
+ # @param request: Request instance for GetSendEmailStatus.
276
+ # @type request: :class:`Tencentcloud::ses::V20201002::GetSendEmailStatusRequest`
277
+ # @rtype: :class:`Tencentcloud::ses::V20201002::GetSendEmailStatusResponse`
278
+ def GetSendEmailStatus(request)
279
+ body = send_request('GetSendEmailStatus', request.serialize)
280
+ response = JSON.parse(body)
281
+ if response['Response'].key?('Error') == false
282
+ model = GetSendEmailStatusResponse.new
283
+ model.deserialize(response['Response'])
284
+ model
285
+ else
286
+ code = response['Response']['Error']['Code']
287
+ message = response['Response']['Error']['Message']
288
+ reqid = response['Response']['RequestId']
289
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
290
+ end
291
+ rescue TencentCloud::Common::TencentCloudSDKException => e
292
+ raise e
293
+ rescue StandardError => e
294
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
295
+ end
296
+
297
+ # 获取近期发送的统计情况,包含发送量、送达率、打开率、退信率等一系列数据。
298
+
299
+ # @param request: Request instance for GetStatisticsReport.
300
+ # @type request: :class:`Tencentcloud::ses::V20201002::GetStatisticsReportRequest`
301
+ # @rtype: :class:`Tencentcloud::ses::V20201002::GetStatisticsReportResponse`
302
+ def GetStatisticsReport(request)
303
+ body = send_request('GetStatisticsReport', request.serialize)
304
+ response = JSON.parse(body)
305
+ if response['Response'].key?('Error') == false
306
+ model = GetStatisticsReportResponse.new
307
+ model.deserialize(response['Response'])
308
+ model
309
+ else
310
+ code = response['Response']['Error']['Code']
311
+ message = response['Response']['Error']['Message']
312
+ reqid = response['Response']['RequestId']
313
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
314
+ end
315
+ rescue TencentCloud::Common::TencentCloudSDKException => e
316
+ raise e
317
+ rescue StandardError => e
318
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
319
+ end
320
+
321
+ # 腾讯云发送的邮件一旦被收件方判断为硬退(Hard Bounce),腾讯云会拉黑该地址,并不允许所有用户向该地址发送邮件。成为邮箱黑名单。如果业务方确认是误判,可以从黑名单中删除。
322
+
323
+ # @param request: Request instance for ListBlackEmailAddress.
324
+ # @type request: :class:`Tencentcloud::ses::V20201002::ListBlackEmailAddressRequest`
325
+ # @rtype: :class:`Tencentcloud::ses::V20201002::ListBlackEmailAddressResponse`
326
+ def ListBlackEmailAddress(request)
327
+ body = send_request('ListBlackEmailAddress', request.serialize)
328
+ response = JSON.parse(body)
329
+ if response['Response'].key?('Error') == false
330
+ model = ListBlackEmailAddressResponse.new
331
+ model.deserialize(response['Response'])
332
+ model
333
+ else
334
+ code = response['Response']['Error']['Code']
335
+ message = response['Response']['Error']['Message']
336
+ reqid = response['Response']['RequestId']
337
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
338
+ end
339
+ rescue TencentCloud::Common::TencentCloudSDKException => e
340
+ raise e
341
+ rescue StandardError => e
342
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
343
+ end
344
+
345
+ # 获取发信地址列表
346
+
347
+ # @param request: Request instance for ListEmailAddress.
348
+ # @type request: :class:`Tencentcloud::ses::V20201002::ListEmailAddressRequest`
349
+ # @rtype: :class:`Tencentcloud::ses::V20201002::ListEmailAddressResponse`
350
+ def ListEmailAddress(request)
351
+ body = send_request('ListEmailAddress', request.serialize)
352
+ response = JSON.parse(body)
353
+ if response['Response'].key?('Error') == false
354
+ model = ListEmailAddressResponse.new
355
+ model.deserialize(response['Response'])
356
+ model
357
+ else
358
+ code = response['Response']['Error']['Code']
359
+ message = response['Response']['Error']['Message']
360
+ reqid = response['Response']['RequestId']
361
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
362
+ end
363
+ rescue TencentCloud::Common::TencentCloudSDKException => e
364
+ raise e
365
+ rescue StandardError => e
366
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
367
+ end
368
+
369
+ # 获取当前发信域名列表,包含已验证通过与未验证的域名
370
+
371
+ # @param request: Request instance for ListEmailIdentities.
372
+ # @type request: :class:`Tencentcloud::ses::V20201002::ListEmailIdentitiesRequest`
373
+ # @rtype: :class:`Tencentcloud::ses::V20201002::ListEmailIdentitiesResponse`
374
+ def ListEmailIdentities(request)
375
+ body = send_request('ListEmailIdentities', request.serialize)
376
+ response = JSON.parse(body)
377
+ if response['Response'].key?('Error') == false
378
+ model = ListEmailIdentitiesResponse.new
379
+ model.deserialize(response['Response'])
380
+ model
381
+ else
382
+ code = response['Response']['Error']['Code']
383
+ message = response['Response']['Error']['Message']
384
+ reqid = response['Response']['RequestId']
385
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
386
+ end
387
+ rescue TencentCloud::Common::TencentCloudSDKException => e
388
+ raise e
389
+ rescue StandardError => e
390
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
391
+ end
392
+
393
+ # 获取当前邮件模板列表
394
+
395
+ # @param request: Request instance for ListEmailTemplates.
396
+ # @type request: :class:`Tencentcloud::ses::V20201002::ListEmailTemplatesRequest`
397
+ # @rtype: :class:`Tencentcloud::ses::V20201002::ListEmailTemplatesResponse`
398
+ def ListEmailTemplates(request)
399
+ body = send_request('ListEmailTemplates', request.serialize)
400
+ response = JSON.parse(body)
401
+ if response['Response'].key?('Error') == false
402
+ model = ListEmailTemplatesResponse.new
403
+ model.deserialize(response['Response'])
404
+ model
405
+ else
406
+ code = response['Response']['Error']['Code']
407
+ message = response['Response']['Error']['Message']
408
+ reqid = response['Response']['RequestId']
409
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
410
+ end
411
+ rescue TencentCloud::Common::TencentCloudSDKException => e
412
+ raise e
413
+ rescue StandardError => e
414
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
415
+ end
416
+
417
+ # 您可以通过此API发送TEXT或者HTML邮件,适用于触发类邮件(验证码、交易类)。默认仅支持使用模板发送邮件,如需发送自定义内容,请单独联系商务开通此功能。
418
+
419
+ # @param request: Request instance for SendEmail.
420
+ # @type request: :class:`Tencentcloud::ses::V20201002::SendEmailRequest`
421
+ # @rtype: :class:`Tencentcloud::ses::V20201002::SendEmailResponse`
422
+ def SendEmail(request)
423
+ body = send_request('SendEmail', request.serialize)
424
+ response = JSON.parse(body)
425
+ if response['Response'].key?('Error') == false
426
+ model = SendEmailResponse.new
427
+ model.deserialize(response['Response'])
428
+ model
429
+ else
430
+ code = response['Response']['Error']['Code']
431
+ message = response['Response']['Error']['Message']
432
+ reqid = response['Response']['RequestId']
433
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
434
+ end
435
+ rescue TencentCloud::Common::TencentCloudSDKException => e
436
+ raise e
437
+ rescue StandardError => e
438
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
439
+ end
440
+
441
+ # 您已经成功配置好了您的DNS,接下来请求腾讯云验证您的DNS配置是否正确
442
+
443
+ # @param request: Request instance for UpdateEmailIdentity.
444
+ # @type request: :class:`Tencentcloud::ses::V20201002::UpdateEmailIdentityRequest`
445
+ # @rtype: :class:`Tencentcloud::ses::V20201002::UpdateEmailIdentityResponse`
446
+ def UpdateEmailIdentity(request)
447
+ body = send_request('UpdateEmailIdentity', request.serialize)
448
+ response = JSON.parse(body)
449
+ if response['Response'].key?('Error') == false
450
+ model = UpdateEmailIdentityResponse.new
451
+ model.deserialize(response['Response'])
452
+ model
453
+ else
454
+ code = response['Response']['Error']['Code']
455
+ message = response['Response']['Error']['Message']
456
+ reqid = response['Response']['RequestId']
457
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
458
+ end
459
+ rescue TencentCloud::Common::TencentCloudSDKException => e
460
+ raise e
461
+ rescue StandardError => e
462
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
463
+ end
464
+
465
+ # 更新邮件模板,更新后需再次审核
466
+
467
+ # @param request: Request instance for UpdateEmailTemplate.
468
+ # @type request: :class:`Tencentcloud::ses::V20201002::UpdateEmailTemplateRequest`
469
+ # @rtype: :class:`Tencentcloud::ses::V20201002::UpdateEmailTemplateResponse`
470
+ def UpdateEmailTemplate(request)
471
+ body = send_request('UpdateEmailTemplate', request.serialize)
472
+ response = JSON.parse(body)
473
+ if response['Response'].key?('Error') == false
474
+ model = UpdateEmailTemplateResponse.new
475
+ model.deserialize(response['Response'])
476
+ model
477
+ else
478
+ code = response['Response']['Error']['Code']
479
+ message = response['Response']['Error']['Message']
480
+ reqid = response['Response']['RequestId']
481
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
482
+ end
483
+ rescue TencentCloud::Common::TencentCloudSDKException => e
484
+ raise e
485
+ rescue StandardError => e
486
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
487
+ end
488
+
489
+
490
+ end
491
+ end
492
+ end
493
+ end