Passed
Pull Request — master (#330)
by Danny
01:33
created

Item::getDownloadUrl()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Picqer\Financials\Exact;
4
5
/**
6
 * Class Item
7
 *
8
 * @package Picqer\Financials\Exact
9
 * @see https://start.exactonline.nl/docs/HlpRestAPIResourcesDetails.aspx?name=logisticsItems
10
 *
11
 * @property string $Barcode Barcode of the item (numeric string)
12
 * @property string $ID Primary key
13
 * @property string $Class_01 Item class code referring to ItemClasses with ClassID 1
14
 * @property string $Class_02 Item class code referring to ItemClasses with ClassID 2
15
 * @property string $Class_03 Item class code referring to ItemClasses with ClassID 3
16
 * @property string $Class_04 Item class code referring to ItemClasses with ClassID 4
17
 * @property string $Class_05 Item class code referring to ItemClasses with ClassID 5
18
 * @property string $Class_06 Item class code referring to ItemClasses with ClassID 6
19
 * @property string $Class_07 Item class code referring to ItemClasses with ClassID 7
20
 * @property string $Class_08 Item class code referring to ItemClasses with ClassID 8
21
 * @property string $Class_09 Item class code referring to ItemClasses with ClassID 9
22
 * @property string $Class_10 Item class code referring to ItemClasses with ClassID 10
23
 * @property string $Code Item code
24
 * @property int $CopyRemarks Copy remarks to sales lines
25
 * @property string $CostPriceCurrency The currency of the current and proposed cost price
26
 * @property float $CostPriceNew Proposed cost price
27
 * @property float $CostPriceStandard The current standard cost price
28
 * @property string $Created Creation date
29
 * @property string $Creator User ID of creator
30
 * @property string $CreatorFullName Name of creator
31
 * @property string $Description Description of the item
32
 * @property int $Division Division code
33
 * @property string $EndDate Together with StartDate this determines if the item is active
34
 * @property string $ExtraDescription Extra description text, slightly longer than the regular description (255 instead of 60)
35
 * @property bool $FreeBoolField_01 Free boolean field 1
36
 * @property bool $FreeBoolField_02 Free boolean field 2
37
 * @property bool $FreeBoolField_03 Free boolean field 3
38
 * @property bool $FreeBoolField_04 Free boolean field 4
39
 * @property bool $FreeBoolField_05 Free boolean field 5
40
 * @property string $FreeDateField_01 Free date field 1
41
 * @property string $FreeDateField_02 Free date field 2
42
 * @property string $FreeDateField_03 Free date field 3
43
 * @property string $FreeDateField_04 Free date field 4
44
 * @property string $FreeDateField_05 Free date field 5
45
 * @property float $FreeNumberField_01 Free numeric field 1
46
 * @property float $FreeNumberField_02 Free numeric field 2
47
 * @property float $FreeNumberField_03 Free numeric field 3
48
 * @property float $FreeNumberField_04 Free numeric field 4
49
 * @property float $FreeNumberField_05 Free numeric field 5
50
 * @property float $FreeNumberField_06 Free numeric field 6
51
 * @property float $FreeNumberField_07 Free numeric field 7
52
 * @property float $FreeNumberField_08 Free numeric field 8
53
 * @property string $FreeTextField_01 Free text field 1
54
 * @property string $FreeTextField_02 Free text field 2
55
 * @property string $FreeTextField_03 Free text field 3
56
 * @property string $FreeTextField_04 Free text field 4
57
 * @property string $FreeTextField_05 Free text field 5
58
 * @property string $FreeTextField_06 Free text field 6
59
 * @property string $FreeTextField_07 Free text field 7
60
 * @property string $FreeTextField_08 Free text field 8
61
 * @property string $FreeTextField_09 Free text field 9
62
 * @property string $FreeTextField_10 Free text field 10
63
 * @property string $GLCosts GL account the cost entries will be booked on. This overrules the GL account from the item group. If the license contains 'Intuit integration' this property overrides the value in Settings, not the item group.
64
 * @property string $GLCostsCode Code of GL account for costs
65
 * @property string $GLCostsDescription Description of GLCosts
66
 * @property string $GLRevenue GL account the revenue will be booked on. This overrules the GL account from the item group. If the license contains 'Intuit integration' this property overrides the value in Settings, not the item group.
67
 * @property string $GLRevenueCode Code of GLRevenue
68
 * @property string $GLRevenueDescription Description of GLRevenue
69
 * @property string $GLStock GL account the stock entries will be booked on. This overrules the GL account from the item group. If the license contains 'Intuit integration' this property overrides the value in Settings, not the item group.
70
 * @property string $GLStockCode Code of GL account for stock
71
 * @property string $GLStockDescription Description of GLStock
72
 * @property int $IsBatchItem Indicates if batches are used for this item
73
 * @property int $IsBatchNumberItem Used with Batch number feature. Indicates if the item can have a batch number
74
 * @property bool $IsFractionAllowedItem Indicates if fractions (for example 0.35) are allowed for quantities of this item
75
 * @property int $IsMakeItem Indicates that an Item is produced to Inventory, not purchased
76
 * @property int $IsNewContract Only used for packages (IsPackageItem=1). To indicate if this package is a new contract type package
77
 * @property int $IsOnDemandItem Is On demand Item
78
 * @property int $IsPackageItem Only used for packages (IsPackageItem=1). To indicate if this package is a new contract type package
79
 * @property bool $IsPurchaseItem Indicates if the item can be purchased
80
 * @property int $IsRegistrationCodeItem Indicated if the item is used in voucher functionality
81
 * @property bool $IsSalesItem Indicates if the item can be sold
82
 * @property bool $IsSerialItem Indicates that serial numbers are used for this item
83
 * @property bool $IsStockItem If you have the Trade or Manufacturing license and you check this property the item will be shown in the stock positions overview, stock counts and transaction lists. If you have the Invoice module and you check this property you will get a general journal entry based on the Stock and Costs G/L accounts of the item group. If you don’t want the general journal entry to be created you should change the Stock/Costs G/L account on the Item group page to the type Costs instead of Inventory.
84
 * @property bool $IsSubcontractedItem Indicates if the item is provided by an outside supplier
85
 * @property int $IsTime Indicates if the item is a time unit item (for example a labor hour item)
86
 * @property int $IsWebshopItem Indicates if the item can be exported to a web shop
87
 * @property string $ItemGroup GUID of Item group of the item
88
 * @property string $ItemGroupCode Code of ItemGroup
89
 * @property string $ItemGroupDescription Description of ItemGroup
90
 * @property string $Modified Last modified date
91
 * @property string $Modifier User ID of modifier
92
 * @property string $ModifierFullName Name of modifier
93
 * @property string $Notes Notes
94
 * @property string $SalesVatCode Code of SalesVat
95
 * @property string $SalesVatCodeDescription Description of SalesVatCode
96
 * @property string $SearchCode Search code of the item
97
 * @property int $SecurityLevel Security level (0 - 100)
98
 * @property string $StartDate Together with StartDate this determines if the item is active
99
 * @property int $Unit Indicates if the item is a time unit item (for example a labor hour item)
100
 * @property string $UnitDescription Description of Unit
101
 * @property string $PictureUrl
102
 * @property string $PictureThumbnailUrl
103
 * @property string $PictureName
104
 */
105
class Item extends Model
106
{
107
    use Query\Findable;
108
    use Persistance\Storable;
109
    use Persistance\Downloadable;
110
        
111
    protected $fillable = [
112
        'Barcode',
113
        'ID',
114
        'Class_01',
115
        'Class_02',
116
        'Class_03',
117
        'Class_04',
118
        'Class_05',
119
        'Class_06',
120
        'Class_07',
121
        'Class_08',
122
        'Class_09',
123
        'Class_10',
124
        'Code',
125
        'CopyRemarks',
126
        'CostPriceCurrency',
127
        'CostPriceNew',
128
        'CostPriceStandard',
129
        'Created',
130
        'Creator',
131
        'CreatorFullName',
132
        'Description',
133
        'Division',
134
        'EndDate',
135
        'ExtraDescription',
136
        'FreeBoolField_01',
137
        'FreeBoolField_02',
138
        'FreeBoolField_03',
139
        'FreeBoolField_04',
140
        'FreeBoolField_05',
141
        'FreeDateField_01',
142
        'FreeDateField_02',
143
        'FreeDateField_03',
144
        'FreeDateField_04',
145
        'FreeDateField_05',
146
        'FreeNumberField_01',
147
        'FreeNumberField_02',
148
        'FreeNumberField_03',
149
        'FreeNumberField_04',
150
        'FreeNumberField_05',
151
        'FreeNumberField_06',
152
        'FreeNumberField_07',
153
        'FreeNumberField_08',
154
        'FreeTextField_01',
155
        'FreeTextField_02',
156
        'FreeTextField_03',
157
        'FreeTextField_04',
158
        'FreeTextField_05',
159
        'FreeTextField_06',
160
        'FreeTextField_07',
161
        'FreeTextField_08',
162
        'FreeTextField_09',
163
        'FreeTextField_10',
164
        'GLCosts',
165
        'GLCostsCode',
166
        'GLCostsDescription',
167
        'GLRevenue',
168
        'GLRevenueCode',
169
        'GLRevenueDescription',
170
        'GLStock',
171
        'GLStockCode',
172
        'GLStockDescription',
173
        'IsBatchItem',
174
        'IsBatchNumberItem',
175
        'IsFractionAllowedItem',
176
        'IsMakeItem',
177
        'IsNewContract',
178
        'IsOnDemandItem',
179
        'IsPackageItem',
180
        'IsPurchaseItem',
181
        'IsRegistrationCodeItem',
182
        'IsSalesItem',
183
        'IsSerialItem',
184
        'IsStockItem',
185
        'IsSubcontractedItem',
186
        'IsTime',
187
        'IsWebshopItem',
188
        'ItemGroup',
189
        'ItemGroupCode',
190
        'ItemGroupDescription',
191
        'Modified',
192
        'Modifier',
193
        'ModifierFullName',
194
        'Notes',
195
        'SalesVatCode',
196
        'SalesVatCodeDescription',
197
        'SearchCode',
198
        'SecurityLevel',
199
        'StartDate',
200
        'Stock',
201
        'Unit',
202
        'UnitDescription',
203
        'PictureUrl',
204
        'PictureThumbnailUrl',
205
        'PictureName',
206
    ];
207
208
    protected $url = 'logistics/Items';
209
210
    /**
211
     * @return string
212
     */
213
    public function getDownloadUrl()
214
    {
215
        return $this->PictureUrl;
216
    }
217
}
218