<?php

namespace easybill\SDK\Model;

/**
 * Class CreateDocument
 *
 * @package easybill\SDK\Model
 */
class DocumentCreated
{
    /** @var  string */
    public $fileName;
    /** @var  string */
    public $file;
    /** @var  boolean */
    public $signDocument;
    /** @varstring */
    public $signexception;
    /** @var  boolean */
    public $sentasemail;
    /** @var  string */
    public $emailsendexception;
    /** @var  boolean */
    public $sentaspost;
    /** @var  string */
    public $postsendexception;
    /** @var  DocumentDescriber */
    public $document;
}
<?php

namespace easybill\SDK\Model;

/**
 * Class CreateDocument
 *
 * @package easybill\SDK\Model
 */
class DocumentCreated
{
    /** @var  string */
    public $fileName;
    /** @var  string */
    public $file;
    /** @var  boolean */
    public $signDocument;
    /** @varstring */
    public $signexception;
    /** @var  boolean */
    public $sentasemail;
    /** @var  string */
    public $emailsendexception;
    /** @var  boolean */
    public $sentaspost;
    /** @var  string */
    public $postsendexception;
    /** @var  DocumentDescriber */
    public $document;

    public function savePDF($destinationPath)
    {
        $handle = fopen($destinationPath, 'w');
        fwrite($handle, base64_decode($this->file));
        fclose($handle);
    }

}
Add function to save pdf file from Document
Add function to save pdf file from Document
