更新订阅绑定的计费账户信息
接口描述
POST /v1/subscriptions/{name}/billingAccounts
更新订阅绑定的计费账户信息
请求头(Request Header)
请求参数(Request Parameters)
| 名称 | 位置 | 类型 | 必须 | 描述 |
|---|---|---|---|---|
| name | path | string | true | 订阅标识 |
请求体(Request Body)
| 名称 | 位置 | 类型 | 必须 | 描述 |
|---|---|---|---|---|
| body | body | EditSubscriptionBillingAccountRequest | true | none |
请求示例(Request Example)
curl --request POST \
--url https://management.sensecoreapi.dev/rmh/v1/subscriptions/string/billingAccounts \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access-token}' \
--header 'Content-Type: application/json' \
--data '{"name":"string","billing_accounts":[{"id":"string","billing_account_id":"string","apply_ratio":0}]}'
响应参数(Response Parameters)
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | EditSubscriptionBillingAccountResponse |
响应示例(Response Example)
200 Response
{
"billing_accounts": [
{
"id": "string",
"billing_account_id": "string",
"distribution_ratio": 0,
"apply_ratio": 0,
"state": "BINDING"
}
]
}
数据结构(Schemas)
EditSubscriptionBillingAccountRequest
| 名称 | 类型 | 必须 | 限制 | 描述 |
|---|---|---|---|---|
| name | string | true | none | 订阅标识 |
| billing_accounts | [UpdateSubscriptionBillingAccount] | false | none | 计费账户信息 |
EditSubscriptionBillingAccountResponse
| 名称 | 类型 | 必须 | 限制 | 描述 |
|---|---|---|---|---|
| billing_accounts | [SubscriptionBillingAccount] | false | none | 计费账户信息 |
SubscriptionBillingAccount
| 名称 | 类型 | 必须 | 限制 | 描述 |
|---|---|---|---|---|
| id | string | false | read-only | 订阅关联计费账户ID |
| billing_account_id | string | true | none | 计费帐号ID |
| distribution_ratio | integer(int32) | false | read-only | 当前计费账户分配比例 |
| apply_ratio | integer(int32) | true | none | 计费账户申请分配比例 |
| state | string(enum) | false | read-only | 订阅绑定计费账户的状态定义 |
state Enumerated Values
| 枚举值 |
|---|
| BINDING |
| CONFIRMING |
| UNBOUND |
| BOUND |
| ADJUSTING |
UpdateSubscriptionBillingAccount
| 名称 | 类型 | 必须 | 限制 | 描述 |
|---|---|---|---|---|
| id | string | false | none | 订阅关联计费账户ID |
| billing_account_id | string | true | none | 计费帐号ID |
| apply_ratio | integer(int32) | true | none | 计费账户申请分配比例 |