Skip to content

Commit a585bef

Browse files
author
fengyikai
committed
证书管理(kcm):ExtendCertificate 证书延期接口对外暴露;费用账单(bill-union):实例按日汇总api更新;
1 parent 84c232e commit a585bef

6 files changed

Lines changed: 72 additions & 2 deletions

File tree

ksyun/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
# limitations under the License.
1515

1616

17-
__version__ = '1.5.8.83'
17+
__version__ = '1.5.8.84'

ksyun/client/bill_union/v20200101/client.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,3 +213,5 @@ def ListProductGroups(self, request):
213213
raise
214214
else:
215215
raise KsyunSDKException(message=str(e))
216+
217+

ksyun/client/bill_union/v20221222/client.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def QueryInstanceConsume(self, request):
1515
"""
1616
try:
1717
params = request._serialize()
18-
body = self.call_judge("QueryInstanceConsume", params, "application/json")
18+
body = self.call_judge("QueryInstanceConsume", params, "application/x-www-form-urlencoded")
1919
response = json.loads(body)
2020
if "Error" not in response:
2121
return body
@@ -144,3 +144,5 @@ def QueryUserConsume(self, request):
144144
raise
145145
else:
146146
raise KsyunSDKException(message=str(e))
147+
148+

ksyun/client/bill_union/v20250801/client.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,5 @@ def QueryProductTypes(self, request):
5252
raise
5353
else:
5454
raise KsyunSDKException(message=str(e))
55+
56+

ksyun/client/kcm/v20160304/client.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,29 @@ def GetCertificateDetail(self, request):
238238
raise KsyunSDKException(message=str(e))
239239

240240

241+
def ExtendCertificate(self, request):
242+
"""证书延期
243+
:param request: Request instance for ExtendCertificate.
244+
:type request: :class:`ksyun.client.kcm.v20160304.models.ExtendCertificateRequest`
245+
"""
246+
try:
247+
params = request._serialize()
248+
body = self.call_judge("ExtendCertificate", params, "application/x-www-form-urlencoded")
249+
response = json.loads(body)
250+
if "Error" not in response:
251+
return body
252+
else:
253+
code = response["Error"]["Code"]
254+
message = response["Error"]["Message"]
255+
req_id = response["RequestId"]
256+
raise KsyunSDKException(code, message, req_id)
257+
except Exception as e:
258+
if isinstance(e, KsyunSDKException):
259+
raise
260+
else:
261+
raise KsyunSDKException(message=str(e))
262+
263+
241264
def DescribeCompany(self, request):
242265
"""联系人列表
243266
:param request: Request instance for DescribeCompany.

ksyun/client/kcm/v20160304/models.py

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,47 @@ def _deserialize(self, params):
402402
self.CertificateId = params.get("CertificateId")
403403

404404

405+
class ExtendCertificateRequest(AbstractModel):
406+
"""ExtendCertificate请求参数结构体
407+
"""
408+
409+
def __init__(self):
410+
r"""证书延期
411+
:param CertificateId: 旧证书ID
412+
:type PathPrefix: String
413+
:param CertificateCode: 证书代码
414+
:type PathPrefix: String
415+
:param YearLength: 证书年限,最长续费1年
416+
:type PathPrefix: Int
417+
:param DomainCount: 域名数量,最小值为1
418+
:type PathPrefix: Int
419+
:param WildcardCount: 通配符域名数量,最小值为0
420+
:type PathPrefix: Int
421+
:param BillType: 计费方式:801 一次性预付费 805 一次性后付费 不填默认值为:805 一次性后付费
422+
:type PathPrefix: Int
423+
"""
424+
self.CertificateId = None
425+
self.CertificateCode = None
426+
self.YearLength = None
427+
self.DomainCount = None
428+
self.WildcardCount = None
429+
self.BillType = None
430+
431+
def _deserialize(self, params):
432+
if params.get("CertificateId"):
433+
self.CertificateId = params.get("CertificateId")
434+
if params.get("CertificateCode"):
435+
self.CertificateCode = params.get("CertificateCode")
436+
if params.get("YearLength"):
437+
self.YearLength = params.get("YearLength")
438+
if params.get("DomainCount"):
439+
self.DomainCount = params.get("DomainCount")
440+
if params.get("WildcardCount"):
441+
self.WildcardCount = params.get("WildcardCount")
442+
if params.get("BillType"):
443+
self.BillType = params.get("BillType")
444+
445+
405446
class DescribeCompanyRequest(AbstractModel):
406447
"""DescribeCompany请求参数结构体
407448
"""

0 commit comments

Comments
 (0)