Last active
October 23, 2018 10:32
-
-
Save jonathanmaron/4a12a8aae67e6b3c64357e20a771043b to your computer and use it in GitHub Desktop.
This file contains hidden or 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
<?php | |
use TxTextControl\ReportingCloud\ReportingCloud; | |
$reportingCloud = new ReportingCloud([ | |
'api_key' => Helper::apiKey(), | |
]); | |
$templateName = 'sample_invoice.tx'; | |
$binaryData = $reportingCloud->downloadTemplate($templateName); | |
$destinationFilename = sys_get_temp_dir() . DIRECTORY_SEPARATOR . $templateName; | |
file_put_contents($destinationFilename, $binaryData); | |
var_dump("{$templateName} was written to {$destinationFilename}"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment