January 29, 2016


Find a billing item from a provisioned product

Determine the billing item of a provisioned product using getBillingItem

In the following example we are looking for the Billing Item of an Endurance Storage volume with an ID of 1234567.

# add your network storage id, it can be found by doing this call: http://sldn.softlayer.com/reference/services/SoftLayer_Account/getNasNetworkStorage
network_storage_id = 1234567
#
item = client[:Network_Storage].object_mask("mask[billingItem[createDate,hoursUsed,hourlyRecurringFee,currentHourlyCharge]]").object_with_id(network_storage_id).getObject
pp item['billingItem']

Feedback?

If this article contains any error, or leaves any of your questions unanswered, please help us out by opening up a github issue.
Open an issue