|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
declare(strict_types=1); |
|
4
|
|
|
|
|
5
|
|
|
/* |
|
6
|
|
|
* Copyright Iain Cambridge 2020-2023. |
|
7
|
|
|
* |
|
8
|
|
|
* Use of this software is governed by the Business Source License included in the LICENSE file and at https://getparthenon.com/docs/next/license. |
|
9
|
|
|
* |
|
10
|
|
|
* Change Date: TBD ( 3 years after 2.2.0 release ) |
|
11
|
|
|
* |
|
12
|
|
|
* On the date above, in accordance with the Business Source License, use of this software will be governed by the open source license specified in the LICENSE file. |
|
13
|
|
|
*/ |
|
14
|
|
|
|
|
15
|
|
|
namespace Parthenon\Billing\Entity; |
|
16
|
|
|
|
|
17
|
|
|
use Parthenon\Billing\Enum\ChargeBackReason; |
|
18
|
|
|
use Parthenon\Billing\Enum\ChargeBackStatus; |
|
19
|
|
|
|
|
20
|
|
|
class ChargeBack |
|
21
|
|
|
{ |
|
22
|
|
|
private $id; |
|
23
|
|
|
|
|
24
|
|
|
private string $externalReference; |
|
25
|
|
|
|
|
26
|
|
|
private CustomerInterface $customer; |
|
27
|
|
|
|
|
28
|
|
|
private Payment $payment; |
|
29
|
|
|
|
|
30
|
|
|
private ChargeBackStatus $status; |
|
31
|
|
|
|
|
32
|
|
|
private ChargeBackReason $reason; |
|
33
|
|
|
|
|
34
|
|
|
private \DateTimeInterface $createdAt; |
|
35
|
|
|
|
|
36
|
|
|
private \DateTimeInterface $updatedAt; |
|
37
|
|
|
|
|
38
|
|
|
public function hasId(): bool |
|
39
|
|
|
{ |
|
40
|
|
|
return isset($this->id); |
|
41
|
|
|
} |
|
42
|
|
|
|
|
43
|
|
|
public function getId() |
|
44
|
|
|
{ |
|
45
|
|
|
return $this->id; |
|
46
|
|
|
} |
|
47
|
|
|
|
|
48
|
|
|
public function setId($id): void |
|
49
|
|
|
{ |
|
50
|
|
|
$this->id = $id; |
|
51
|
|
|
} |
|
52
|
|
|
|
|
53
|
|
|
public function getExternalReference(): string |
|
54
|
|
|
{ |
|
55
|
|
|
return $this->externalReference; |
|
56
|
|
|
} |
|
57
|
|
|
|
|
58
|
|
|
public function setExternalReference(string $externalReference): void |
|
59
|
|
|
{ |
|
60
|
|
|
$this->externalReference = $externalReference; |
|
61
|
|
|
} |
|
62
|
|
|
|
|
63
|
|
|
public function getCustomer(): CustomerInterface |
|
64
|
|
|
{ |
|
65
|
|
|
return $this->customer; |
|
66
|
|
|
} |
|
67
|
|
|
|
|
68
|
|
|
public function setCustomer(CustomerInterface $customer): void |
|
69
|
|
|
{ |
|
70
|
|
|
$this->customer = $customer; |
|
71
|
|
|
} |
|
72
|
|
|
|
|
73
|
|
|
public function getPayment(): Payment |
|
74
|
|
|
{ |
|
75
|
|
|
return $this->payment; |
|
76
|
|
|
} |
|
77
|
|
|
|
|
78
|
|
|
public function setPayment(Payment $payment): void |
|
79
|
|
|
{ |
|
80
|
|
|
$this->payment = $payment; |
|
81
|
|
|
} |
|
82
|
|
|
|
|
83
|
|
|
public function getStatus(): ChargeBackStatus |
|
84
|
|
|
{ |
|
85
|
|
|
return $this->status; |
|
86
|
|
|
} |
|
87
|
|
|
|
|
88
|
|
|
public function setStatus(ChargeBackStatus $status): void |
|
89
|
|
|
{ |
|
90
|
|
|
$this->status = $status; |
|
91
|
|
|
} |
|
92
|
|
|
|
|
93
|
|
|
public function getReason(): ChargeBackReason |
|
94
|
|
|
{ |
|
95
|
|
|
return $this->reason; |
|
96
|
|
|
} |
|
97
|
|
|
|
|
98
|
|
|
public function setReason(ChargeBackReason $reason): void |
|
99
|
|
|
{ |
|
100
|
|
|
$this->reason = $reason; |
|
101
|
|
|
} |
|
102
|
|
|
|
|
103
|
|
|
public function getCreatedAt(): \DateTimeInterface |
|
104
|
|
|
{ |
|
105
|
|
|
return $this->createdAt; |
|
106
|
|
|
} |
|
107
|
|
|
|
|
108
|
|
|
public function setCreatedAt(\DateTimeInterface $createdAt): void |
|
109
|
|
|
{ |
|
110
|
|
|
$this->createdAt = $createdAt; |
|
111
|
|
|
} |
|
112
|
|
|
|
|
113
|
|
|
public function getUpdatedAt(): \DateTimeInterface |
|
114
|
|
|
{ |
|
115
|
|
|
return $this->updatedAt; |
|
116
|
|
|
} |
|
117
|
|
|
|
|
118
|
|
|
public function setUpdatedAt(\DateTimeInterface $updatedAt): void |
|
119
|
|
|
{ |
|
120
|
|
|
$this->updatedAt = $updatedAt; |
|
121
|
|
|
} |
|
122
|
|
|
} |
|
123
|
|
|
|