Skip to content

Commit 272df8f

Browse files
Merge pull request #140 from jdcloud-apigateway/master
billing 1.0.33
2 parents c586a90 + da44546 commit 272df8f

31 files changed

+779
-41
lines changed

jdcloud_sdk/services/billing/ChangeLog.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,35 @@
1+
2021-07-12 version: 1.0.33
2+
1.更新官网计费文档,涉及查询账单资源汇总、明细接口
3+
4+
2020-11-10 version: 1.0.28
5+
1.新增客户账单汇总接口
6+
7+
2020-06-16 version: 1.0.24
8+
1.更新接口文档参数说明
9+
10+
2020-06-03 version: 1.0.23
11+
1.更新接口文档参数说明
12+
13+
2020-05-19 version: 1.0.20
14+
1. 控制台资源账单、消费明细相关接口增加资源id字段
15+
16+
2020-04-14 version: 1.0.18
17+
1. 控制台查询新增返回原价、优惠金额列
18+
19+
2020-03-25 version: 1.0.15
20+
1. billStatisticsInfo增加查询条件queryTimeRangeType
21+
22+
2020-02-20 version: 1.0.14
23+
1. 新增计费规则相关接口
24+
25+
2019-12-12 version: 1.0.13
26+
1. 增加集团安全部门查询资源单列表接口
27+
28+
2019-12-02 version: 1.0.12
29+
1. 修改帐单接口参数含义
30+
2019-12-02 version: 1.0.11
31+
1. EBS接收分摊表返回值修改
32+
133
2019-11-08 version: 1.0.10
234
1. 新增查询欠费接口
335

jdcloud_sdk/services/billing/apis/CalculateTotalPriceRequest.py

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ def __init__(self, regionId, cmd, packageCount, ):
4747
self.clientType = None
4848
self.packageCount = packageCount
4949
self.processType = None
50+
self.renewMode = None
51+
self.unifyExpireDay = None
52+
self.totalPriceRule = None
5053

5154
def setOrderList(self, orderList):
5255
"""
@@ -56,7 +59,7 @@ def setOrderList(self, orderList):
5659

5760
def setOperateTime(self, operateTime):
5861
"""
59-
:param operateTime: (Optional) 操作时间,遵循ISO8601标准,使用UTC时间,格式为:YYYY-MM-DDTHH:mm:ssZ
62+
:param operateTime: (Optional) 操作时间(格式为:yyyy-MM-dd HH:mm:ss)
6063
"""
6164
self.operateTime = operateTime
6265

@@ -78,3 +81,21 @@ def setProcessType(self, processType):
7881
"""
7982
self.processType = processType
8083

84+
def setRenewMode(self, renewMode):
85+
"""
86+
:param renewMode: (Optional) 续费方式 0:正常续费 1:续费至统一到期日,续费时必传
87+
"""
88+
self.renewMode = renewMode
89+
90+
def setUnifyExpireDay(self, unifyExpireDay):
91+
"""
92+
:param unifyExpireDay: (Optional) 续费统一到期日(1-28),续费时必传
93+
"""
94+
self.unifyExpireDay = unifyExpireDay
95+
96+
def setTotalPriceRule(self, totalPriceRule):
97+
"""
98+
:param totalPriceRule: (Optional) 计算总价规则 1:计算预付费资源总价(计费类型为包年包月、按次) ;不传计算所有资源总价
99+
"""
100+
self.totalPriceRule = totalPriceRule
101+

jdcloud_sdk/services/billing/apis/QueryBillDetailRequest.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ class QueryBillDetailParameters(object):
3535
def __init__(self, regionId, startTime, endTime, ):
3636
"""
3737
:param regionId: Region ID
38-
:param startTime: 计费开始时间
39-
:param endTime: 计费结束时间
38+
:param startTime: 账期开始时间,不支持跨月查询。格式:yyyy-MM-dd HH:mm:ss
39+
:param endTime: 账期结束时间,不支持跨月查询。格式:yyyy-MM-dd HH:mm:ss
4040
"""
4141

4242
self.regionId = regionId
@@ -70,25 +70,29 @@ def setBillingType(self, billingType):
7070

7171
def setResourceIds(self, resourceIds):
7272
"""
73-
:param resourceIds: (Optional) 资源单id列表
73+
:param resourceIds: (Optional) 资源单id列表,最多支持传入500个
7474
"""
7575
self.resourceIds = resourceIds
7676

7777
def setTags(self, tags):
7878
"""
79-
:param tags: (Optional) 标签
79+
:param tags: (Optional) 标签,JSON格式:[{"k1":"v1"},{"k1":"v2"},{"k2":""}]
80+
示例:
81+
选择的标签为, 部门:广告部、部门:物流部、项目
82+
则传值为:[{"部门":"广告部"},{"部门":"物流部"},{"项目":""}]
83+
8084
"""
8185
self.tags = tags
8286

8387
def setPageIndex(self, pageIndex):
8488
"""
85-
:param pageIndex: (Optional) pageIndex
89+
:param pageIndex: (Optional) pageIndex 分页,默认从1开始
8690
"""
8791
self.pageIndex = pageIndex
8892

8993
def setPageSize(self, pageSize):
9094
"""
91-
:param pageSize: (Optional) pageSize
95+
:param pageSize: (Optional) pageSize 每页查询数据条数,最多支持1000条
9296
"""
9397
self.pageSize = pageSize
9498

jdcloud_sdk/services/billing/apis/QueryBillSummaryRequest.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ class QueryBillSummaryParameters(object):
3535
def __init__(self, regionId, startTime, endTime, ):
3636
"""
3737
:param regionId: Region ID
38-
:param startTime: 计费开始时间
39-
:param endTime: 计费结束时间
38+
:param startTime: 账期开始时间,不支持跨月查询。格式:yyyy-MM-dd HH:mm:ss
39+
:param endTime: 账期结束时间,不支持跨月查询。格式:yyyy-MM-dd HH:mm:ss
4040
"""
4141

4242
self.regionId = regionId
@@ -63,25 +63,29 @@ def setServiceCode(self, serviceCode):
6363

6464
def setResourceIds(self, resourceIds):
6565
"""
66-
:param resourceIds: (Optional) 资源单id列表
66+
:param resourceIds: (Optional) 资源单id列表,最多支持传入500个
6767
"""
6868
self.resourceIds = resourceIds
6969

7070
def setTags(self, tags):
7171
"""
72-
:param tags: (Optional) 标签
72+
:param tags: (Optional) 标签,JSON格式:[{"k1":"v1"},{"k1":"v2"},{"k2":""}]
73+
示例:
74+
选择的标签为, 部门:广告部、部门:物流部、项目
75+
则传值为:[{"部门":"广告部"},{"部门":"物流部"},{"项目":""}]
76+
7377
"""
7478
self.tags = tags
7579

7680
def setPageIndex(self, pageIndex):
7781
"""
78-
:param pageIndex: (Optional) pageIndex
82+
:param pageIndex: (Optional) pageIndex 分页,默认从1开始
7983
"""
8084
self.pageIndex = pageIndex
8185

8286
def setPageSize(self, pageSize):
8387
"""
84-
:param pageSize: (Optional) pageSize
88+
:param pageSize: (Optional) pageSize 每页查询数据条数,最多支持1000条
8589
"""
8690
self.pageSize = pageSize
8791

jdcloud_sdk/services/billing/client/BillingClient.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ def __init__(self, credential, config=None, logger=None):
2626
if config is None:
2727
config = Config('billing.jdcloud-api.com')
2828

29-
super(BillingClient, self).__init__(credential, config, 'billing', '1.0.10', logger)
29+
super(BillingClient, self).__init__(credential, config, 'billing', '1.0.33', logger)
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# coding=utf8
2+
3+
# Copyright 2018 JDCLOUD.COM
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+
# NOTE: This class is auto generated by the jdcloud code generator program.
18+
19+
20+
class AccountingRule(object):
21+
22+
def __init__(self, site, targetType, outAccountType, appCode=None, serviceCode=None, pin=None, outAccountDay=None, timeCron=None):
23+
"""
24+
:param site: 站点
25+
:param appCode: (Optional) 产品线
26+
:param targetType: 出账对象类型 1:通用 2:用户
27+
:param serviceCode: (Optional) 产品
28+
:param pin: (Optional) pin
29+
:param outAccountType: 出账类型 1:实时出账 2:定期出账
30+
:param outAccountDay: (Optional) 出账周期:限制范围 1-28
31+
:param timeCron: (Optional) 定期出账 时间表达式
32+
"""
33+
34+
self.site = site
35+
self.appCode = appCode
36+
self.targetType = targetType
37+
self.serviceCode = serviceCode
38+
self.pin = pin
39+
self.outAccountType = outAccountType
40+
self.outAccountDay = outAccountDay
41+
self.timeCron = timeCron
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# coding=utf8
2+
3+
# Copyright 2018 JDCLOUD.COM
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+
# NOTE: This class is auto generated by the jdcloud code generator program.
18+
19+
20+
class AccountingRuleUpdate(object):
21+
22+
def __init__(self, site=None, pin=None, outAccountType=None, outAccountDay=None, timeCron=None):
23+
"""
24+
:param site: (Optional) 站点
25+
:param pin: (Optional) pin
26+
:param outAccountType: (Optional) 出账类型 1:实时出账 2:定期出账
27+
:param outAccountDay: (Optional) 出账周期:限制范围 1-28
28+
:param timeCron: (Optional) 定期出账 时间表达式
29+
"""
30+
31+
self.site = site
32+
self.pin = pin
33+
self.outAccountType = outAccountType
34+
self.outAccountDay = outAccountDay
35+
self.timeCron = timeCron
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# coding=utf8
2+
3+
# Copyright 2018 JDCLOUD.COM
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+
# NOTE: This class is auto generated by the jdcloud code generator program.
18+
19+
20+
class AccountingRuleVo(object):
21+
22+
def __init__(self, id=None, site=None, appCode=None, targetType=None, serviceCode=None, pin=None, outAccountType=None, outAccountDay=None, timeCron=None, targetTypeName=None, appCodeName=None, serviceCodeName=None, outAccountTypeName=None):
23+
"""
24+
:param id: (Optional) id
25+
:param site: (Optional) 站点
26+
:param appCode: (Optional) 产品线
27+
:param targetType: (Optional) 出账对象类型 1:通用 2:用户
28+
:param serviceCode: (Optional) 产品
29+
:param pin: (Optional) pin
30+
:param outAccountType: (Optional) 出账类型 1:实时出账 2:定期出账
31+
:param outAccountDay: (Optional) 出账周期:限制范围 1-28
32+
:param timeCron: (Optional) 定期出账 时间表达式
33+
:param targetTypeName: (Optional) 出账对象类型名称
34+
:param appCodeName: (Optional) 产品线名称
35+
:param serviceCodeName: (Optional) 产品名称
36+
:param outAccountTypeName: (Optional) 出账类型名称
37+
"""
38+
39+
self.id = id
40+
self.site = site
41+
self.appCode = appCode
42+
self.targetType = targetType
43+
self.serviceCode = serviceCode
44+
self.pin = pin
45+
self.outAccountType = outAccountType
46+
self.outAccountDay = outAccountDay
47+
self.timeCron = timeCron
48+
self.targetTypeName = targetTypeName
49+
self.appCodeName = appCodeName
50+
self.serviceCodeName = serviceCodeName
51+
self.outAccountTypeName = outAccountTypeName
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# coding=utf8
2+
3+
# Copyright 2018 JDCLOUD.COM
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+
# NOTE: This class is auto generated by the jdcloud code generator program.
18+
19+
20+
class BatchUpdateBillingStatusReq(object):
21+
22+
def __init__(self, serviceCode, resourceIds, action, mainResourceId=None, comment=None):
23+
"""
24+
:param serviceCode: 产品编码
25+
:param mainResourceId: (Optional) 主资源ID
26+
:param resourceIds: 资源ID列表
27+
:param action: 操作(STOP 停止计费 ; RESTART 恢复计费)
28+
:param comment: (Optional) 操作说明
29+
"""
30+
31+
self.serviceCode = serviceCode
32+
self.mainResourceId = mainResourceId
33+
self.resourceIds = resourceIds
34+
self.action = action
35+
self.comment = comment

jdcloud_sdk/services/billing/models/BillSummary.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,20 @@ class BillSummary(object):
2222
def __init__(self, pin=None, appCode=None, appCodeName=None, serviceCode=None, serviceCodeName=None, billingType=None, billingTypeName=None, resourceId=None, resourceName=None, region=None, actionTypeName=None, formula=None, startTime=None, endTime=None, billTime=None, totalFee=None, discountFee=None, realTotalFee=None, cashCouponPayFee=None, balancePayFee=None, cashPayFee=None, arrearFee=None, tagDetails=None):
2323
"""
2424
:param pin: (Optional) 用户pin
25-
:param appCode: (Optional) appCode
25+
:param appCode: (Optional) 产品线代码
2626
:param appCodeName: (Optional) 产品线代码名称
27-
:param serviceCode: (Optional) serviceCode
27+
:param serviceCode: (Optional) 产品代码
2828
:param serviceCodeName: (Optional) 产品代码名称
2929
:param billingType: (Optional) 计费类型
3030
:param billingTypeName: (Optional) 计费类型描述
3131
:param resourceId: (Optional) 资源id
3232
:param resourceName: (Optional) 资源名称
3333
:param region: (Optional) 区域
34-
:param actionTypeName: (Optional) 费用类型
34+
:param actionTypeName: (Optional) 费用类型,仅用于查询帐单明细接口。取值:[新购、续费、配置变更、退订、按量费用]
3535
:param formula: (Optional) 规格
3636
:param startTime: (Optional) 计费开始时间
3737
:param endTime: (Optional) 计费结束时间
38-
:param billTime: (Optional) 账单生成时间
38+
:param billTime: (Optional) 账单生成时间,仅用于查询帐单明细接口
3939
:param totalFee: (Optional) 账单总额
4040
:param discountFee: (Optional) 优惠金额
4141
:param realTotalFee: (Optional) 优惠后总价金额

0 commit comments

Comments
 (0)