Completed
Push — master ( d63375...7feaf8 )
by Stephan
02:17 queued 44s
created

DocumentAttachment   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 13
dl 0
loc 23
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getDownloadUrl() 0 3 1
1
<?php
2
3
namespace Picqer\Financials\Exact;
4
5
/**
6
 * Class DocumentAttachment
7
 *
8
 * @package Picqer\Financials\Exact
9
 * @see https://start.exactonline.nl/docs/HlpRestAPIResourcesDetails.aspx?name=documentsDocumentAttachments
10
 *
11
 * @property string $ID Primary key
12
 * @property string $Attachment Contains the attachment
13
 * @property string $Document Reference to the Document
14
 * @property string $FileName Filename of the attachment
15
 * @property float $FileSize File size of the attachment
16
 * @property string $Url Url of the attachment. To get the file in its original format (xml, jpg, pdf, etc.) append &Download=1 to the url.
17
 */
18
class DocumentAttachment extends Model
19
{
20
    use Query\Findable;
21
    use Persistance\Storable;
22
    use Persistance\Downloadable;
23
24
    protected $fillable = [
25
        'ID',
26
        'Attachment',
27
        'Document',
28
        'FileName',
29
        'FileSize',
30
        'Url',
31
    ];
32
33
    protected $url = 'documents/DocumentAttachments';
34
35
    /**
36
     * @return string
37
     */
38
    public function getDownloadUrl()
39
    {
40
        return $this->Url . '&Download=1';
41
    }
42
}
43