Passed
Push — master ( 9db3d0...354d5b )
by Reyo
02:53
created

Expense::getCustomerId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 0
cts 3
cp 0
crap 2
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the timechimp bundle package.
7
 * (c) Connect Holland.
8
 */
9
10
namespace ConnectHolland\TimechimpBundle\Api\Model;
11
12
class Expense
13
{
14
    /**
15
     * @var int|null
16
     */
17
    protected $id;
18
    /**
19
     * CustomerId or ProjectId is required.
20
     *
21
     * @var int|null
22
     */
23
    protected $customerId;
24
    /**
25
     * @var string|null
26
     */
27
    protected $customerName;
28
    /**
29
     * CustomerId or ProjectId is required. When ProjectId is filled, CustomerId can be empty.
30
     *
31
     * @var int|null
32
     */
33
    protected $projectId;
34
    /**
35
     * @var string|null
36
     */
37
    protected $projectName;
38
    /**
39
     * @var string|null
40
     */
41
    protected $categoryName;
42
    /**
43
     * @var int|null
44
     */
45
    protected $categoryId;
46
    /**
47
     * If UserId is empty, current user will be linked.
48
     *
49
     * @var int|null
50
     */
51
    protected $userId;
52
    /**
53
     * @var string|null
54
     */
55
    protected $userDisplayName;
56
    /**
57
     * Date is required.
58
     *
59
     * @var \DateTime|null
60
     */
61
    protected $date;
62
    /**
63
     * @var string|null
64
     */
65
    protected $notes;
66
    /**
67
     * @var string|null
68
     */
69
    protected $attachment;
70
    /**
71
     * Default is 1.
72
     *
73
     * @var float|null
74
     */
75
    protected $quantity;
76
    /**
77
     * Rate is required.
78
     *
79
     * @var float|null
80
     */
81
    protected $rate;
82
    /**
83
     * Tax is required. 21% = 21.00, 6% = 6.00, 0% = 0.0.
84
     *
85
     * @var float|null
86
     */
87
    protected $tax;
88
    /**
89
     * @var bool|null
90
     */
91
    protected $billable;
92
    /**
93
     * 0 = Open, 1 = PendingApproval, 2 = Approved, 3 = Invoiced, 4 = WrittenOff, -1 = Rejected.
94
     *
95
     * @var int|null
96
     */
97
    protected $status;
98
99
    public function getId(): ?int
100
    {
101
        return $this->id;
102
    }
103
104
    public function setId(?int $id): self
105
    {
106
        $this->id = $id;
107
108
        return $this;
109
    }
110
111
    /**
112
     * CustomerId or ProjectId is required.
113
     */
114
    public function getCustomerId(): ?int
115
    {
116
        return $this->customerId;
117
    }
118
119
    /**
120
     * CustomerId or ProjectId is required.
121
     */
122
    public function setCustomerId(?int $customerId): self
123
    {
124
        $this->customerId = $customerId;
125
126
        return $this;
127
    }
128
129
    public function getCustomerName(): ?string
130
    {
131
        return $this->customerName;
132
    }
133
134
    public function setCustomerName(?string $customerName): self
135
    {
136
        $this->customerName = $customerName;
137
138
        return $this;
139
    }
140
141
    /**
142
     * CustomerId or ProjectId is required. When ProjectId is filled, CustomerId can be empty.
143
     */
144
    public function getProjectId(): ?int
145
    {
146
        return $this->projectId;
147
    }
148
149
    /**
150
     * CustomerId or ProjectId is required. When ProjectId is filled, CustomerId can be empty.
151
     */
152
    public function setProjectId(?int $projectId): self
153
    {
154
        $this->projectId = $projectId;
155
156
        return $this;
157
    }
158
159
    public function getProjectName(): ?string
160
    {
161
        return $this->projectName;
162
    }
163
164
    public function setProjectName(?string $projectName): self
165
    {
166
        $this->projectName = $projectName;
167
168
        return $this;
169
    }
170
171
    public function getCategoryName(): ?string
172
    {
173
        return $this->categoryName;
174
    }
175
176
    public function setCategoryName(?string $categoryName): self
177
    {
178
        $this->categoryName = $categoryName;
179
180
        return $this;
181
    }
182
183
    public function getCategoryId(): ?int
184
    {
185
        return $this->categoryId;
186
    }
187
188
    public function setCategoryId(?int $categoryId): self
189
    {
190
        $this->categoryId = $categoryId;
191
192
        return $this;
193
    }
194
195
    /**
196
     * If UserId is empty, current user will be linked.
197
     */
198
    public function getUserId(): ?int
199
    {
200
        return $this->userId;
201
    }
202
203
    /**
204
     * If UserId is empty, current user will be linked.
205
     */
206
    public function setUserId(?int $userId): self
207
    {
208
        $this->userId = $userId;
209
210
        return $this;
211
    }
212
213
    public function getUserDisplayName(): ?string
214
    {
215
        return $this->userDisplayName;
216
    }
217
218
    public function setUserDisplayName(?string $userDisplayName): self
219
    {
220
        $this->userDisplayName = $userDisplayName;
221
222
        return $this;
223
    }
224
225
    /**
226
     * Date is required.
227
     */
228
    public function getDate(): ?\DateTime
229
    {
230
        return $this->date;
231
    }
232
233
    /**
234
     * Date is required.
235
     */
236
    public function setDate(?\DateTime $date): self
237
    {
238
        $this->date = $date;
239
240
        return $this;
241
    }
242
243
    public function getNotes(): ?string
244
    {
245
        return $this->notes;
246
    }
247
248
    public function setNotes(?string $notes): self
249
    {
250
        $this->notes = $notes;
251
252
        return $this;
253
    }
254
255
    public function getAttachment(): ?string
256
    {
257
        return $this->attachment;
258
    }
259
260
    public function setAttachment(?string $attachment): self
261
    {
262
        $this->attachment = $attachment;
263
264
        return $this;
265
    }
266
267
    /**
268
     * Default is 1.
269
     */
270
    public function getQuantity(): ?float
271
    {
272
        return $this->quantity;
273
    }
274
275
    /**
276
     * Default is 1.
277
     */
278
    public function setQuantity(?float $quantity): self
279
    {
280
        $this->quantity = $quantity;
281
282
        return $this;
283
    }
284
285
    /**
286
     * Rate is required.
287
     */
288
    public function getRate(): ?float
289
    {
290
        return $this->rate;
291
    }
292
293
    /**
294
     * Rate is required.
295
     */
296
    public function setRate(?float $rate): self
297
    {
298
        $this->rate = $rate;
299
300
        return $this;
301
    }
302
303
    /**
304
     * Tax is required. 21% = 21.00, 6% = 6.00, 0% = 0.0.
305
     */
306
    public function getTax(): ?float
307
    {
308
        return $this->tax;
309
    }
310
311
    /**
312
     * Tax is required. 21% = 21.00, 6% = 6.00, 0% = 0.0.
313
     */
314
    public function setTax(?float $tax): self
315
    {
316
        $this->tax = $tax;
317
318
        return $this;
319
    }
320
321
    public function getBillable(): ?bool
322
    {
323
        return $this->billable;
324
    }
325
326
    public function setBillable(?bool $billable): self
327
    {
328
        $this->billable = $billable;
329
330
        return $this;
331
    }
332
333
    /**
334
     * 0 = Open, 1 = PendingApproval, 2 = Approved, 3 = Invoiced, 4 = WrittenOff, -1 = Rejected.
335
     */
336
    public function getStatus(): ?int
337
    {
338
        return $this->status;
339
    }
340
341
    /**
342
     * 0 = Open, 1 = PendingApproval, 2 = Approved, 3 = Invoiced, 4 = WrittenOff, -1 = Rejected.
343
     */
344
    public function setStatus(?int $status): self
345
    {
346
        $this->status = $status;
347
348
        return $this;
349
    }
350
}
351