估计收费业务

本节描述的操作使开发商能够管理估计收费

获取估计收费

GET /v2/accounts/{ran}/estimated_charges

返回当前计费周期估计费用汇总列表当前只支持当前计费周期

请求

请求有下列URI和标题参数:

名称 类型 描述性
{ran} URI字符串 帐号
充电Type 字符串 收费类型参考附录了解有效值
提供代码 字符串 本参数用于筛选产品特有结果参考附录了解有效值
X-AUT-Token 页眉字符串 有效认证令牌关联
接受 页眉字符串 值:应用/json

操作不接受请求体

响应

示例获取估计电荷-云类(部分示例):JSON响应

华体会联盟hth{    "estimatedCharges": {       "total": 30,       "discountTotal": "-50.00",       "chargeSubTotal": "100.00",       "chargeHierarchyTotal": "0.00",       "currency": "USD",       "currentBillingPeriodStartDate":"2016-10-16T21:32:52",       "currentBillingPeriodEndDate":"2016-11-16T21:32:52",       "durationRemainingInCycle": "P15D",       "estimatedCharge": [{          "offeringCode": "DBAAS",          "quantity": "10.00",          "amount": "1000.00",          "unitOfMeasure": "HRS",          "rate": ".40",          "category": "CHARGE",          "chargeType": "UPTIME"       }, {          "offeringCode": "MAAS",          "amount": "3.09",          "chargeType": "NUM_CHKS_HRS",          "quantity": "3000.00",          "category": "CHARGE",          "rate": "2.00",          "unitOfMeasure": "CHKS_HRS"       }, {          "offeringCode": "CSITES",          "rate": ".12",          "quantity": "12.00",          "category": "CHARGE",          "amount": "3.14",          "unitOfMeasure": "COUNT",          "chargeType": "COMPUTE_CYCLE_OVERAGE"       }, {          "offeringCode": "RCDN",          "amount": "3.14",          "chargeType": "BWOUT",          "quantity": "12.00",          "category": "CHARGE",          "unitOfMeasure": "GB"       },{          "rate": "100.00",          "quantity": "1.00",          "category": "DISCOUNT",          "amount": "-100.00",          "unitOfMeasure": "COUNT",          "endDate": "2016-05-30T09:30:10Z",          "chargeType": "Commit Discount",          "chargeDetails":"10% off spending over $1,000.00.",          "chargeDescription": "10% off spending over $1,000.00."       }],       "link": [{          "rel": "next",          "href": "https://billing.api.rackspacecloud.com/v2/accounts/{ran}/estimated-charges?marker=0&limit=10"       }, {          "rel": "prev",          "href": "https://billing.api.rackspacecloud.com/v2/accounts/{ran}/estimated-charges?marker=0&limit=10"       }]    } }

示例获取估计收费-专用:JSON响应

华体会联盟hth{    "estimatedCharges": {       "total": 30,       "discountTotal": "-50.00",       "chargeSubTotal": "100.00",       "chargeTotal": "50.00",       "chargeHierarchyTotal": "0.00",       "currency": "USD",       "currentBillingPeriodStartDate":"2016-10-16T21:32:52",       "currentBillingPeriodEndDate":"2016-11-16T21:32:52",       "durationRemainingInCycle": "P15D"       "link": [{          "rel": "next",          "href": "https://billing.api.rackspacecloud.com/v2/accounts/{ran}/estimated-charges?marker=0&limit=10"       }, {          "rel": "prev",          "href": "https://billing.api.rackspacecloud.com/v2/accounts/{ran}/estimated-charges?marker=0&limit=10"       }]    } }

本表显示此操作可能的响应码 :

响应码 名称 描述性
二百 请求成功
400 坏请求 泛报出错
401 未授权 请求未被应用, 因为它缺少目标资源有效认证证书 。证书过期或无效
404 未找到 服务器找不到请求内容 。
405 方法不允许 请求行中接收的方法为源服务器所知,但目标资源不支持
406 不可接受 服务器无法生成匹配请求中定义的可接受值列表响应
415 无支持媒体类型 错误介质类型用于cURL请求时可能导致错误
500 内部服务器错误 服务器遇到意外条件,无法满足请求

拥有下列任一角色的用户可访问该API:

  • identity:user-admin
  • 管理员
  • 计费单:admin
  • 观察者
  • billing:observer
Baidu
map