getPdf() public method

Requests a PDF document from the given URI
public getPdf ( string $uri, string $locale = null ) : string
$uri string Target URI for this request (relative to the API root)
$locale string Locale for the PDF invoice (e.g. "en-GB", "en-US", "fr")
return string $response PDF document
Exemplo n.º 1
0
 /**
  * Retrieve the PDF version of an invoice
  */
 public static function getInvoicePdf($invoiceNumber, $locale = null, $client = null)
 {
     $uri = self::uriForInvoice($invoiceNumber);
     if (is_null($client)) {
         $client = new Recurly_Client();
     }
     return $client->getPdf($uri, $locale);
 }
 /**
  * Retrieve the PDF version of an invoice
  */
 public static function getInvoicePdf($invoiceNumber, $locale = null, $client = null)
 {
     $uri = Recurly_Client::PATH_INVOICES . '/' . rawurlencode($invoiceNumber);
     if (is_null($client)) {
         $client = new Recurly_Client();
     }
     return $client->getPdf($uri, $locale);
 }