Completed
Push — master ( 05297f...b8a6a6 )
by Vragov
03:04
created

Order::getSupplierServiceCost()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
namespace SafeCrow\Model;
3
4
/**
5
 * Class Order
6
 * @package SafeCrow\Model
7
 */
8
class Order
9
{
10
    /**
11
     * @var string
12
     */
13
    const PAYER_CONSUMER = 'consumer';
14
15
    /**
16
     * @var string
17
     */
18
    const PAYER_SUPPLIER = 'supplier';
19
20
    /**
21
     * @var string
22
     */
23
    const PAYER_HALF = '50/50';
24
25
    /**
26
     * @var string
27
     */
28
    const STATUS_PENDING = 'pending';
29
30
    /**
31
     * @var string
32
     */
33
    const STATUS_PAID = 'paid';
34
35
    /**
36
     * @var string
37
     */
38
    const STATUS_ANNULLED = 'annulled';
39
40
    /**
41
     * @var int
42
     */
43
    private $id;
44
45
    /**
46
     * @var int
47
     */
48
    private $consumerId;
49
50
    /**
51
     * @var int
52
     */
53
    private $supplierId;
54
55
    /**
56
     * @var int
57
     */
58
    private $price;
59
60
    /**
61
     * @var int
62
     */
63
    private $consumerServiceCost;
64
65
    /**
66
     * @var int
67
     */
68
    private $supplierServiceCost;
69
70
    /**
71
     * @var string
72
     */
73
    private $status;
74
75
    /**
76
     * @var string
77
     */
78
    private $description;
79
80
    /**
81
     * @var int|null
82
     */
83
    private $supplierPayoutMethodId;
84
85
    /**
86
     * @var string|null
87
     */
88
    private $supplierPayoutMethodType;
89
90
    /**
91
     * @var \DateTime
92
     */
93
    private $createdAt;
94
95
    /**
96
     * @var \DateTime
97
     */
98
    private $updatedAt;
99
100
    /**
101
     * @var array
102
     */
103
    private $extra = [];
104
105
    /**
106
     * @return int
107
     */
108
    public function getId(): int
109
    {
110
        return $this->id;
111
    }
112
113
    /**
114
     * @param int $id
115
     * @return Order
116
     */
117
    public function setId(int $id): Order
118
    {
119
        $this->id = $id;
120
121
        return $this;
122
    }
123
124
    /**
125
     * @return int
126
     */
127
    public function getConsumerId(): int
128
    {
129
        return $this->consumerId;
130
    }
131
132
    /**
133
     * @param int $consumerId
134
     * @return Order
135
     */
136
    public function setConsumerId(int $consumerId): Order
137
    {
138
        $this->consumerId = $consumerId;
139
140
        return $this;
141
    }
142
143
    /**
144
     * @return int
145
     */
146
    public function getSupplierId(): int
147
    {
148
        return $this->supplierId;
149
    }
150
151
    /**
152
     * @param int $supplierId
153
     * @return Order
154
     */
155
    public function setSupplierId(int $supplierId): Order
156
    {
157
        $this->supplierId = $supplierId;
158
159
        return $this;
160
    }
161
162
    /**
163
     * @return int
164
     */
165
    public function getPrice(): int
166
    {
167
        return $this->price;
168
    }
169
170
    /**
171
     * @param int $price
172
     * @return Order
173
     */
174
    public function setPrice(int $price): Order
175
    {
176
        $this->price = $price;
177
178
        return $this;
179
    }
180
181
    /**
182
     * @return int
183
     */
184
    public function getConsumerServiceCost(): int
185
    {
186
        return $this->consumerServiceCost;
187
    }
188
189
    /**
190
     * @param int $consumerServiceCost
191
     * @return Order
192
     */
193
    public function setConsumerServiceCost(int $consumerServiceCost): Order
194
    {
195
        $this->consumerServiceCost = $consumerServiceCost;
196
197
        return $this;
198
    }
199
200
    /**
201
     * @return int
202
     */
203
    public function getSupplierServiceCost(): int
204
    {
205
        return $this->supplierServiceCost;
206
    }
207
208
    /**
209
     * @param int $supplierServiceCost
210
     * @return Order
211
     */
212
    public function setSupplierServiceCost(int $supplierServiceCost): Order
213
    {
214
        $this->supplierServiceCost = $supplierServiceCost;
215
216
        return $this;
217
    }
218
219
    /**
220
     * @return string
221
     */
222
    public function getStatus(): string
223
    {
224
        return $this->status;
225
    }
226
227
    /**
228
     * @param string $status
229
     * @return Order
230
     */
231
    public function setStatus(string $status): Order
232
    {
233
        $this->status = $status;
234
235
        return $this;
236
    }
237
238
    /**
239
     * @return string
240
     */
241
    public function getDescription(): string
242
    {
243
        return $this->description;
244
    }
245
246
    /**
247
     * @param string $description
248
     * @return Order
249
     */
250
    public function setDescription(string $description): Order
251
    {
252
        $this->description = $description;
253
254
        return $this;
255
    }
256
257
    /**
258
     * @return int|null
259
     */
260
    public function getSupplierPayoutMethodId()
261
    {
262
        return $this->supplierPayoutMethodId;
263
    }
264
265
    /**
266
     * @param int|null $supplierPayoutMethodId
267
     * @return Order
268
     */
269
    public function setSupplierPayoutMethodId($supplierPayoutMethodId): Order
270
    {
271
        $this->supplierPayoutMethodId = $supplierPayoutMethodId;
272
273
        return $this;
274
    }
275
276
    /**
277
     * @return string|null
278
     */
279
    public function getSupplierPayoutMethodType()
280
    {
281
        return $this->supplierPayoutMethodType;
282
    }
283
284
    /**
285
     * @param string|null $supplierPayoutMethodType
286
     * @return Order
287
     */
288
    public function setSupplierPayoutMethodType($supplierPayoutMethodType): Order
289
    {
290
        $this->supplierPayoutMethodType = $supplierPayoutMethodType;
291
292
        return $this;
293
    }
294
295
    /**
296
     * @return \DateTime
297
     */
298
    public function getCreatedAt(): \DateTime
299
    {
300
        return $this->createdAt;
301
    }
302
303
    /**
304
     * @param \DateTime $createdAt
305
     * @return Order
306
     */
307
    public function setCreatedAt(\DateTime $createdAt): Order
308
    {
309
        $this->createdAt = $createdAt;
310
311
        return $this;
312
    }
313
314
    /**
315
     * @return \DateTime
316
     */
317
    public function getUpdatedAt(): \DateTime
318
    {
319
        return $this->updatedAt;
320
    }
321
322
    /**
323
     * @param \DateTime $updatedAt
324
     * @return Order
325
     */
326
    public function setUpdatedAt(\DateTime $updatedAt): Order
327
    {
328
        $this->updatedAt = $updatedAt;
329
330
        return $this;
331
    }
332
333
    /**
334
     * @return array
335
     */
336
    public function getExtra(): array
337
    {
338
        return $this->extra;
339
    }
340
341
    /**
342
     * @param array $extra
343
     * @return Order
344
     */
345
    public function setExtra(array $extra): Order
346
    {
347
        $this->extra = $extra;
348
349
        return $this;
350
    }
351
}
352