Softlayer API:以前的计费周期计费项目详细信息 [英] Softlayer API: previous Billing cycle Billing Item Details

查看:45
本文介绍了Softlayer API:以前的计费周期计费项目详细信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有任何API可在其中获取以前的结算周期结算项目明细.就像已经创建了多少个设备,以及该设备已使用了几个小时,已充电的金额等.

解决方案

请参见 http://sldn.softlayer.com/reference/services/SoftLayer_Account

您可以看到所有可用的方法,也许这一方法可以为您提供帮助:

http://sldn.softlayer.com/reference/services/SoftLayer_Account/getInvoices

这里是一个使用PHP客户端在特定日期范围内获取发票的示例

https://softlayer.github.io/php/get_invoice/

该方法将返回您帐户中的所有发票,您只需要使用createDate和closedDate对其进行过滤即可.

关于设备的使用情况,我认为您引用的是hoursUsed参数,因为每个帐单周期都会计算该参数,所以不会显示该参数,但是您可以计算出具有创建机器时的日期的值以及开票单据的开始日期和结束日期.

致谢

Is there any API where I can fetch previous Billing cycle Billing Item Details. Like how many devices have been created and for how many hours the device has been used,amount charged etc..

解决方案

See http://sldn.softlayer.com/reference/services/SoftLayer_Account

there you can see all the methods available, perhaps this one can help you:

http://sldn.softlayer.com/reference/services/SoftLayer_Account/getInvoices

here an example using the PHP client to get the invoices in a dterminate range of date

https://softlayer.github.io/php/get_invoice/

The method will return all the invoices in your account you just need to filter them using the createDate and the closedDate.

About the usage of the device, I think you are refering to the hoursUsed parameter, that parameter is not displayed because is calculated for every billing cicle, but you can calculate that values having the date when the machine has been created and the dates when the billing cicle started and when it ended.

Regards

这篇关于Softlayer API:以前的计费周期计费项目详细信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆