Payment::setNextEvent()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
ccs 0
cts 5
cp 0
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
crap 2
1
<?php
2
3
namespace Speicher210\Fastbill\Api\Model\Notification\Payment;
4
5
use JMS\Serializer\Annotation as JMS;
6
7
/**
8
 * Payment in a notification model.
9
 */
10
class Payment
11
{
12
    const PAYMENT_STATUS_OPEN = 'open';
13
14
    const PAYMENT_STATUS_ERROR = 'error';
15
16
    /**
17
     * The payment ID.
18
     *
19
     * @var integer
20
     *
21
     * @JMS\Type("integer")
22
     * @JMS\SerializedName("payment_id")
23
     */
24
    protected $paymentId;
25
26
    /**
27
     * The invoice ID.
28
     *
29
     * @var integer
30
     *
31
     * @JMS\Type("string")
32
     * @JMS\SerializedName("invoice_id")
33
     */
34
    protected $invoiceId;
35
36
    /**
37
     * The invoice number.
38
     *
39
     * @var string
40
     *
41
     * @JMS\Type("string")
42
     * @JMS\SerializedName("invoice_number")
43
     */
44
    protected $invoiceNumber;
45
46
    /**
47
     * The invoice URL.
48
     *
49
     * @var string
50
     *
51
     * @JMS\Type("string")
52
     * @JMS\SerializedName("invoice_url")
53
     */
54
    protected $invoiceUrl;
55
56
    /**
57
     * The total amount.
58
     *
59
     * @var string
60
     *
61
     * @JMS\Type("string")
62
     * @JMS\SerializedName("total_amount")
63
     */
64
    protected $totalAmount;
65
66
    /**
67
     * The payment currency.
68
     *
69
     * @var string
70
     *
71
     * @JMS\Type("string")
72
     * @JMS\SerializedName("currency")
73
     */
74
    protected $currency;
75
76
    /**
77
     * The payment method.
78
     *
79
     * @var string
80
     *
81
     * @JMS\Type("string")
82
     * @JMS\SerializedName("method")
83
     */
84
    protected $method;
85
86
    /**
87
     * The payment gateway.
88
     *
89
     * @var string
90
     *
91
     * @JMS\Type("string")
92
     * @JMS\SerializedName("gateway")
93
     */
94
    protected $gateway;
95
96
    /**
97
     * The payment reference.
98
     *
99
     * @var string
100
     *
101
     * @JMS\Type("string")
102
     * @JMS\SerializedName("reference")
103
     */
104
    protected $reference;
105
106
    /**
107
     * The flag if payment is test.
108
     *
109
     * @var string
110
     *
111
     * @JMS\Type("string")
112
     * @JMS\SerializedName("test")
113
     */
114
    protected $test;
115
116
    /**
117
     * The type of the payment.
118
     *
119
     * @var string
120
     *
121
     * @JMS\Type("string")
122
     * @JMS\SerializedName("type")
123
     */
124
    protected $type;
125
126
    /**
127
     * The status of the payment.
128
     *
129
     * @var string
130
     *
131
     * @JMS\Type("string")
132
     * @JMS\SerializedName("status")
133
     */
134
    protected $status;
135
136
    /**
137
     *  The payment next event date and time.
138
     *
139
     * @var \DateTime
140
     *
141
     * @JMS\Type("DateTime<'Y-m-d H:i:s'>")
142
     * @JMS\SerializedName("next_event")
143
     */
144
    protected $nextEvent;
145
146
    /**
147
     * The date and time when the payment was created.
148
     *
149
     * @var \DateTime
150
     *
151
     * @JMS\Type("DateTime<'Y-m-d H:i:s'>")
152
     * @JMS\SerializedName("created")
153
     */
154
    protected $created;
155
156
    /**
157
     * Get the payment ID.
158
     *
159
     * @return int
160
     */
161
    public function getPaymentId()
162
    {
163
        return $this->paymentId;
164
    }
165
166
    /**
167
     * Set the payment ID.
168
     *
169
     * @param int $paymentId The payment ID.
170
     * @return Payment
171
     */
172
    public function setPaymentId($paymentId)
173
    {
174
        $this->paymentId = $paymentId;
175
176
        return $this;
177
    }
178
179
    /**
180
     * Get the invoice ID.
181
     *
182
     * @return int
183
     */
184
    public function getInvoiceId()
185
    {
186
        return $this->invoiceId;
187
    }
188
189
    /**
190
     * Set the invoice ID.
191
     *
192
     * @param int $invoiceId The invoice ID.
193
     * @return Payment
194
     */
195
    public function setInvoiceId($invoiceId)
196
    {
197
        $this->invoiceId = $invoiceId;
198
199
        return $this;
200
    }
201
202
    /**
203
     * Get the invoice number.
204
     *
205
     * @return string
206
     */
207
    public function getInvoiceNumber()
208
    {
209
        return $this->invoiceNumber;
210
    }
211
212
    /**
213
     * Set the invoice number.
214
     *
215
     * @param string $invoiceNumber The invoice number.
216
     * @return Payment
217
     */
218
    public function setInvoiceNumber($invoiceNumber)
219
    {
220
        $this->invoiceNumber = $invoiceNumber;
221
222
        return $this;
223
    }
224
225
    /**
226
     * Get the invoice URL.
227
     *
228
     * @return string
229
     */
230
    public function getInvoiceUrl()
231
    {
232
        return $this->invoiceUrl;
233
    }
234
235
    /**
236
     * Set the invoice URL.
237
     *
238
     * @param string $invoiceUrl The invoice URL.
239
     * @return Payment
240
     */
241
    public function setInvoiceUrl($invoiceUrl)
242
    {
243
        $this->invoiceUrl = $invoiceUrl;
244
245
        return $this;
246
    }
247
248
    /**
249
     * Get the total amount.
250
     *
251
     * @return string
252
     */
253
    public function getTotalAmount()
254
    {
255
        return $this->totalAmount;
256
    }
257
258
    /**
259
     * Set the total amount.
260
     *
261
     * @param string $totalAmount The total amount.
262
     * @return Payment
263
     */
264
    public function setTotalAmount($totalAmount)
265
    {
266
        $this->totalAmount = $totalAmount;
267
268
        return $this;
269
    }
270
271
    /**
272
     * Get the currency.
273
     *
274
     * @return string
275
     */
276
    public function getCurrency()
277
    {
278
        return $this->currency;
279
    }
280
281
    /**
282
     * Set the currency.
283
     *
284
     * @param string $currency The currency.
285
     * @return Payment
286
     */
287
    public function setCurrency($currency)
288
    {
289
        $this->currency = $currency;
290
291
        return $this;
292
    }
293
294
    /**
295
     * Get the method.
296
     *
297
     * @return string
298
     */
299
    public function getMethod()
300
    {
301
        return $this->method;
302
    }
303
304
    /**
305
     * Set the method.
306
     *
307
     * @param string $method The method.
308
     * @return Payment
309
     */
310
    public function setMethod($method)
311
    {
312
        $this->method = $method;
313
314
        return $this;
315
    }
316
317
    /**
318
     * Get the gateway.
319
     *
320
     * @return string
321
     */
322
    public function getGateway()
323
    {
324
        return $this->gateway;
325
    }
326
327
    /**
328
     * Set the gateway.
329
     *
330
     * @param string $gateway The gateway.
331
     * @return Payment
332
     */
333
    public function setGateway($gateway)
334
    {
335
        $this->gateway = $gateway;
336
337
        return $this;
338
    }
339
340
    /**
341
     * Get the reference.
342
     *
343
     * @return string
344
     */
345
    public function getReference()
346
    {
347
        return $this->reference;
348
    }
349
350
    /**
351
     * Set the reference.
352
     *
353
     * @param string $reference The reference.
354
     * @return Payment
355
     */
356
    public function setReference($reference)
357
    {
358
        $this->reference = $reference;
359
360
        return $this;
361
    }
362
363
    /**
364
     * Get the test.
365
     *
366
     * @return string
367
     */
368
    public function getTest()
369
    {
370
        return $this->test;
371
    }
372
373
    /**
374
     * Set the test.
375
     *
376
     * @param string $test The test.
377
     * @return Payment
378
     */
379
    public function setTest($test)
380
    {
381
        $this->test = $test;
382
383
        return $this;
384
    }
385
386
    /**
387
     * Get the type.
388
     *
389
     * @return string
390
     */
391
    public function getType()
392
    {
393
        return $this->type;
394
    }
395
396
    /**
397
     * Set the type.
398
     *
399
     * @param string $type The type.
400
     * @return Payment
401
     */
402
    public function setType($type)
403
    {
404
        $this->type = $type;
405
406
        return $this;
407
    }
408
409
    /**
410
     * Get the status.
411
     *
412
     * @return string
413
     */
414
    public function getStatus()
415
    {
416
        return $this->status;
417
    }
418
419
    /**
420
     * Set the status.
421
     *
422
     * @param string $status The status.
423
     * @return Payment
424
     */
425
    public function setStatus($status)
426
    {
427
        $this->status = $status;
428
429
        return $this;
430
    }
431
432
    /**
433
     * Get the next event date and time.
434
     *
435
     * @return \DateTime
436
     */
437
    public function getNextEvent()
438
    {
439
        return $this->nextEvent;
440
    }
441
442
    /**
443
     * Set the next event date and time.
444
     *
445
     * @param \DateTime $nextEvent The next event date and time.
446
     * @return Payment
447
     */
448
    public function setNextEvent($nextEvent)
449
    {
450
        $this->nextEvent = $nextEvent;
451
452
        return $this;
453
    }
454
455
    /**
456
     * Get the creation date and time.
457
     *
458
     * @return \DateTime
459
     */
460
    public function getCreated()
461
    {
462
        return $this->created;
463
    }
464
465
    /**
466
     * Set the creation date and time.
467
     *
468
     * @param \DateTime $created The creation date and time.
469
     * @return Payment
470
     */
471
    public function setCreated($created)
472
    {
473
        $this->created = $created;
474
475
        return $this;
476
    }
477
}
478