Skip to Content
GPU 接口文档团队管理查询成员未支付订单数量
GPU API 接口

查询成员未支付订单数量

接口说明

查询指定团队成员的未支付订单数量及金额汇总。

POSThttps://api.compshare.cnActionDescribeTeamMemberUnpaidOrderCount

使用限制

  • 账户需完成实名认证。
  • 需要团队管理员权限。

请求参数

名称类型必填描述示例值
ActionString接口名称DescribeTeamMemberUnpaidOrderCount
RegionString地域cn-wlcb
TeamIdUint32团队 ID100001
VirtualCompanyIdUint32成员虚拟账户 ID300001
OrganizationIdUint32组织(项目)ID400001
ResourceIdsArray of String资源 ID 数组["uhost-xxx"]
ResourceTypesArray of Integer产品类型 ID 数组[1]
OrderTypesArray of String订单类型数组["Buy"]
OrderStatesArray of String订单状态数组["UNPAID_FINISHED"]
ChargeTypesArray of String计费类型数组["Month"]
RegionsArray of Integer可用区 ID 数组[1000039]
TransactionNosArray of String交易流水号数组["trade-xxx"]
BeginTimeInt查询起始时间(Unix 时间戳)1700000000
EndTimeInt查询结束时间(Unix 时间戳)1700086400

响应参数

名称类型描述示例值
ActionString响应名称DescribeTeamMemberUnpaidOrderCountResponse
RetCodeInteger返回码,0 为成功0
TotalCountInt未支付订单总数3
AmountString未支付总金额(元)150.00

请求示例

Python(使用 UCloud SDK)

安装 SDK:

pip install --upgrade ucloud-sdk-python3

示例代码:

from ucloud.core import exc from ucloud.client import Client def main(): client = Client({ "region": "cn-wlcb", "public_key": "my_public_key", # 替换为你的公钥(控制台 账户中心 → API 密钥:https://console.compshare.cn/uaccount/api_manage) "private_key": "my_private_key", # 替换为你的私钥 "base_url": "https://api.compshare.cn", }) try: resp = client.ucompshare().describe_team_member_unpaid_order_count({ "TeamId": 100001, "VirtualCompanyId": 300001, }) print(f"未支付订单数: {resp['TotalCount']}") print(f"未支付总金额: {resp['Amount']}") except exc.UCloudException as e: print(e) if __name__ == "__main__": main()

Go(使用 UCloud SDK)

安装依赖:

go get github.com/ucloud/ucloud-sdk-go

示例代码:

package main import ( "fmt" "github.com/ucloud/ucloud-sdk-go/services/ucompshare" "github.com/ucloud/ucloud-sdk-go/ucloud" "github.com/ucloud/ucloud-sdk-go/ucloud/auth" ) func main() { cfg := ucloud.NewConfig() cfg.Region = "cn-wlcb" cfg.BaseUrl = "https://api.compshare.cn" credential := auth.NewCredential() credential.PublicKey = "my_public_key" // 替换为你的公钥(控制台 账户中心 → API 密钥:https://console.compshare.cn/uaccount/api_manage) credential.PrivateKey = "my_private_key" // 替换为你的私钥 client := ucompshare.NewClient(&cfg, &credential) req := client.NewDescribeTeamMemberUnpaidOrderCountRequest() req.TeamId = ucloud.Uint32(100001) req.VirtualCompanyId = ucloud.Uint32(300001) resp, err := client.DescribeTeamMemberUnpaidOrderCount(req) if err != nil { fmt.Printf("查询失败: %s\n", err) return } fmt.Printf("未支付订单数: %d, 未支付总金额: %s\n", resp.TotalCount, resp.Amount) }

响应示例

{ "Action": "DescribeTeamMemberUnpaidOrderCountResponse", "RetCode": 0, "TotalCount": 3, "Amount": "150.00" }
Last updated on