DocumentAttachment   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

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

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
 * @see https://start.exactonline.nl/docs/HlpRestAPIResourcesDetails.aspx?name=documentsDocumentAttachments
9
 *
10
 * @property string $ID Primary key
11
 * @property string $Attachment Contains the attachment
12
 * @property string $Document Reference to the Document
13
 * @property string $FileName Filename of the attachment
14
 * @property float $FileSize File size of the attachment
15
 * @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.
16
 */
17
class DocumentAttachment extends Model
18
{
19
    use Query\Findable;
20
    use Persistance\Storable;
21
    use Persistance\Downloadable;
22
23
    protected $fillable = [
24
        'ID',
25
        'Attachment',
26
        'Document',
27
        'FileName',
28
        'FileSize',
29
        'Url',
30
    ];
31
32
    protected $url = 'documents/DocumentAttachments';
33
34
    /**
35
     * @return string
36
     */
37
    public function getDownloadUrl()
38
    {
39
        return $this->Url . '&Download=1';
40
    }
41
}
42