Skip to content

Forward status code to download response when http info is enabled

Compare
Choose a tag to compare
@deviddev deviddev released this 20 Nov 19:38
· 11 commits to main since this release

This additional allow you to get the response status code when download a document.
Turn on http info with: withHttpInfo() method to get status code forwarded.
The default status is null, when http info is NOT turned on.

This feature is useful when billingo is NOT generated the document yet.

Documentation for response status codes: DownloadDocument

BillingoApi::api('Document')->withHttpInfo()->downloadInvoice($invoiceId)->getResponse()

Response:

[
  "path" => "invoices/43867578.pdf"
  "status" => 200
]