Retrieve the invoice information.
This script makes a single call to the getInvoices() method in the
SoftLayer_Account API service and uses a object mask to get more
information about the invoices.
Important manual pages
Author: SoftLayer Technologies, Inc. <firstname.lastname@example.org>
Your SoftLayer API username and key.
USERNAME = 'set me'
API_KEY = 'set me'
# Declare the API client
client = SoftLayer.Client(username=USERNAME, api_key=API_KEY)
accountService = client['SoftLayer_Account']
# Declaring the object mask to get information about the invoices.
objectMask = "mask[payment,amount,invoiceTotalOneTimeAmount,invoiceTotalRecurringAmount,invoiceTotalOneTimeTaxAmount,invoiceTotalRecurringTaxAmount]"
# Retrieve the invoices for the account.
invoices = accountService.getInvoices(mask=objectMask)
except SoftLayer.SoftLayerAPIError as e:
print("Unable to retrieve the invoices. " % (e.faultCode, e.faultString))