getPdfFileSize


SoftLayer_Billing_Invoice::getPdfFileSize

Retrieve the size of a PDF copy of an invoice.

Description

Retrieve the size of a PDF record of a SoftLayer invoice. SoftLayer keeps PDF records of all closed invoices for customer retrieval from the portal and API.

Parameters

None

Required Headers

Optional Headers

  • None

Return Values

  • int

Error Handling

  • Throw the exception “PDF does not exist: invoice has not yet been closed.” when trying to retrieve an open invoice. Open invoices do not have PDF records.
  • Throw the exception “PDF does not exist: file not found” if the API is unable to locate the PDF File for the invoice.
  • Throw the exception “Unable to load a valid invoice PDF.” if the PDF for this invoice is a corrupted.
curl -g -u $SL_USER:$SL_APIKEY -X GET \
'https://api.softlayer.com/rest/v3.1/SoftLayer_Billing_Invoice/{SoftLayer_Billing_InvoiceID}/getPdfFileSize'