Last active
August 29, 2015 14:01
-
-
Save chechuironman/d71bf8c5eae846499b33 to your computer and use it in GitHub Desktop.
Get invoicing details from order id
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################################################################################## | |
# Get invoicing details from order id | |
# ©Copyright IBM Corporation 2014. | |
# LICENSE: MIT (http://opensource.org/licenses/MIT) | |
# modules used: | |
# pprint, softlayer-api | |
################################################################################## | |
import SoftLayer.API | |
from pprint import pprint as pp | |
apiUsername = 'xxxx' | |
apiKey = 'xxxxx' | |
client = SoftLayer.Client( | |
username=apiUsername, | |
api_key=apiKey, | |
) | |
billing_order_id = xxxx | |
object_mask='mask[items[billingItem[hoursUsed,hourlyRecurringFee,description,recurringFee],order[initialInvoice[invoiceTopLevelItems[hostName, domainName]]]]]' | |
billing_order = client['Billing_Order'].getObject(id=billing_order_id, mask=object_mask) | |
pp(billing_order) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment