Item   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 117
Duplicated Lines 0 %

Importance

Changes 6
Bugs 0 Features 0
Metric Value
wmc 1
eloc 107
c 6
b 0
f 0
dl 0
loc 117
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 Item.
7
 *
8
 * @see https://start.exactonline.nl/docs/HlpRestAPIResourcesDetails.aspx?name=LogisticsItems
9
 *
10
 * @property string $ID Primary key
11
 * @property string $Barcode Barcode of the item (numeric string)
12
 * @property string $Class_01 Item class code referring to ItemClasses with ClassID 1
13
 * @property string $Class_02 Item class code referring to ItemClasses with ClassID 2
14
 * @property string $Class_03 Item class code referring to ItemClasses with ClassID 3
15
 * @property string $Class_04 Item class code referring to ItemClasses with ClassID 4
16
 * @property string $Class_05 Item class code referring to ItemClasses with ClassID 5
17
 * @property string $Class_06 Item class code referring to ItemClasses with ClassID 6
18
 * @property string $Class_07 Item class code referring to ItemClasses with ClassID 7
19
 * @property string $Class_08 Item class code referring to ItemClasses with ClassID 8
20
 * @property string $Class_09 Item class code referring to ItemClasses with ClassID 9
21
 * @property string $Class_10 Item class code referring to ItemClasses with ClassID 10
22
 * @property string $Code Item code
23
 * @property int $CopyRemarks Copy sales remarks to sales lines
24
 * @property string $CostPriceCurrency The currency of the current and proposed cost price
25
 * @property float $CostPriceNew Proposed cost price
26
 * @property float $CostPriceStandard The current standard cost price
27
 * @property string $Created Creation date
28
 * @property string $Creator User ID of creator
29
 * @property string $CreatorFullName Name of creator
30
 * @property string $Description Description of the item
31
 * @property int $Division Division code
32
 * @property string $EndDate Together with StartDate this determines if the item is active
33
 * @property string $ExtraDescription Extra description text, slightly longer than the regular description (255 instead of 60)
34
 * @property bool $FreeBoolField_01 Free boolean field 1
35
 * @property bool $FreeBoolField_02 Free boolean field 2
36
 * @property bool $FreeBoolField_03 Free boolean field 3
37
 * @property bool $FreeBoolField_04 Free boolean field 4
38
 * @property bool $FreeBoolField_05 Free boolean field 5
39
 * @property string $FreeDateField_01 Free date field 1
40
 * @property string $FreeDateField_02 Free date field 2
41
 * @property string $FreeDateField_03 Free date field 3
42
 * @property string $FreeDateField_04 Free date field 4
43
 * @property string $FreeDateField_05 Free date field 5
44
 * @property float $FreeNumberField_01 Free numeric field 1
45
 * @property float $FreeNumberField_02 Free numeric field 2
46
 * @property float $FreeNumberField_03 Free numeric field 3
47
 * @property float $FreeNumberField_04 Free numeric field 4
48
 * @property float $FreeNumberField_05 Free numeric field 5
49
 * @property float $FreeNumberField_06 Free numeric field 6
50
 * @property float $FreeNumberField_07 Free numeric field 7
51
 * @property float $FreeNumberField_08 Free numeric field 8
52
 * @property string $FreeTextField_01 Free text field 1
53
 * @property string $FreeTextField_02 Free text field 2
54
 * @property string $FreeTextField_03 Free text field 3
55
 * @property string $FreeTextField_04 Free text field 4
56
 * @property string $FreeTextField_05 Free text field 5
57
 * @property string $FreeTextField_06 Free text field 6
58
 * @property string $FreeTextField_07 Free text field 7
59
 * @property string $FreeTextField_08 Free text field 8
60
 * @property string $FreeTextField_09 Free text field 9
61
 * @property string $FreeTextField_10 Free text field 10
62
 * @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.
63
 * @property string $GLCostsCode Code of GL account for costs
64
 * @property string $GLCostsDescription Description of GLCosts
65
 * @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.
66
 * @property string $GLRevenueCode Code of GLRevenue
67
 * @property string $GLRevenueDescription Description of GLRevenue
68
 * @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.
69
 * @property string $GLStockCode Code of GL account for stock
70
 * @property string $GLStockDescription Description of GLStock
71
 * @property float $GrossWeight Gross weight for international goods shipments
72
 * @property int $IsBatchItem Indicates if batches are used for this item
73
 * @property int $IsBatchNumberItem This property is obsolete. Use property 'IsBatchItem' instead.
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 bool $IsPackageItem Indicates if the item is a package item. Can only be created in the hosting administration
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 $IsSerialNumberItem This property is obsolete. Use property 'IsSerialItem' instead.
84
 * @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.
85
 * @property bool $IsSubcontractedItem Indicates if the item is provided by an outside supplier
86
 * @property int $IsTaxableItem Indicates if tax needs to be calculated for this item
87
 * @property int $IsTime Indicates if the item is a time unit item (for example a labor hour item)
88
 * @property int $IsWebshopItem Indicates if the item can be exported to a web shop
89
 * @property string $ItemGroup GUID of Item group of the item
90
 * @property string $ItemGroupCode Code of ItemGroup
91
 * @property string $ItemGroupDescription Description of ItemGroup
92
 * @property string $Modified Last modified date
93
 * @property string $Modifier User ID of modifier
94
 * @property string $ModifierFullName Name of modifier
95
 * @property float $NetWeight Net weight for international goods shipments
96
 * @property string $NetWeightUnit Net Weight unit for international goods shipment, only available in manufacturing packages
97
 * @property string $Notes Notes
98
 * @property string $PictureName File name of picture
99
 * @property string $PictureThumbnailUrl Url where thumbnail picture can be retrieved
100
 * @property string $PictureUrl Url where picture can be retrieved
101
 * @property string $SalesVatCode Code of SalesVat
102
 * @property string $SalesVatCodeDescription Description of SalesVatCode
103
 * @property string $SearchCode Search code of the item
104
 * @property int $SecurityLevel Security level (0 - 100)
105
 * @property string $StartDate Together with EndDate this determines if the item is active
106
 * @property float $Stock Quantity that is in stock
107
 * @property string $Unit The standard unit of this item
108
 * @property string $UnitDescription Description of Unit
109
 * @property string $UnitType Type of unit: A=Area, L=Length, O=Other, T=Time, V=Volume, W=Weight
110
 */
111
class Item extends Model
112
{
113
    use Query\Findable;
114
    use Persistance\Storable;
115
    use Persistance\Downloadable;
116
117
    protected $fillable = [
118
        'ID',
119
        'Barcode',
120
        'Class_01',
121
        'Class_02',
122
        'Class_03',
123
        'Class_04',
124
        'Class_05',
125
        'Class_06',
126
        'Class_07',
127
        'Class_08',
128
        'Class_09',
129
        'Class_10',
130
        'Code',
131
        'CopyRemarks',
132
        'CostPriceCurrency',
133
        'CostPriceNew',
134
        'CostPriceStandard',
135
        'Created',
136
        'Creator',
137
        'CreatorFullName',
138
        'Description',
139
        'Division',
140
        'EndDate',
141
        'ExtraDescription',
142
        'FreeBoolField_01',
143
        'FreeBoolField_02',
144
        'FreeBoolField_03',
145
        'FreeBoolField_04',
146
        'FreeBoolField_05',
147
        'FreeDateField_01',
148
        'FreeDateField_02',
149
        'FreeDateField_03',
150
        'FreeDateField_04',
151
        'FreeDateField_05',
152
        'FreeNumberField_01',
153
        'FreeNumberField_02',
154
        'FreeNumberField_03',
155
        'FreeNumberField_04',
156
        'FreeNumberField_05',
157
        'FreeNumberField_06',
158
        'FreeNumberField_07',
159
        'FreeNumberField_08',
160
        'FreeTextField_01',
161
        'FreeTextField_02',
162
        'FreeTextField_03',
163
        'FreeTextField_04',
164
        'FreeTextField_05',
165
        'FreeTextField_06',
166
        'FreeTextField_07',
167
        'FreeTextField_08',
168
        'FreeTextField_09',
169
        'FreeTextField_10',
170
        'GLCosts',
171
        'GLCostsCode',
172
        'GLCostsDescription',
173
        'GLRevenue',
174
        'GLRevenueCode',
175
        'GLRevenueDescription',
176
        'GLStock',
177
        'GLStockCode',
178
        'GLStockDescription',
179
        'GrossWeight',
180
        'IsBatchItem',
181
        'IsBatchNumberItem',
182
        'IsFractionAllowedItem',
183
        'IsMakeItem',
184
        'IsNewContract',
185
        'IsOnDemandItem',
186
        'IsPackageItem',
187
        'IsPurchaseItem',
188
        'IsRegistrationCodeItem',
189
        'IsSalesItem',
190
        'IsSerialItem',
191
        'IsSerialNumberItem',
192
        'IsStockItem',
193
        'IsSubcontractedItem',
194
        'IsTaxableItem',
195
        'IsTime',
196
        'IsWebshopItem',
197
        'ItemGroup',
198
        'ItemGroupCode',
199
        'ItemGroupDescription',
200
        'Modified',
201
        'Modifier',
202
        'ModifierFullName',
203
        'NetWeight',
204
        'NetWeightUnit',
205
        'Notes',
206
        'PictureName',
207
        'PictureThumbnailUrl',
208
        'PictureUrl',
209
        'SalesVatCode',
210
        'SalesVatCodeDescription',
211
        'SearchCode',
212
        'SecurityLevel',
213
        'StartDate',
214
        'Stock',
215
        'Unit',
216
        'UnitDescription',
217
        'UnitType',
218
    ];
219
220
    protected $url = 'logistics/Items';
221
222
    /**
223
     * @return string
224
     */
225
    public function getDownloadUrl()
226
    {
227
        return $this->PictureUrl;
228
    }
229
}
230