1
|
|
|
<?php |
2
|
|
|
namespace CultureKings\Afterpay\Model\InStore; |
3
|
|
|
|
4
|
|
|
use CultureKings\Afterpay\Model\ErrorResponse; |
5
|
|
|
|
6
|
|
|
/** |
7
|
|
|
* Class Reversal |
8
|
|
|
* @package CultureKings\Afterpay\Model\InStore |
9
|
|
|
*/ |
10
|
|
|
class Reversal |
11
|
|
|
{ |
12
|
|
|
/** |
13
|
|
|
* @var string |
14
|
|
|
*/ |
15
|
|
|
protected $reverseId; |
16
|
|
|
/** |
17
|
|
|
* @var \DateTimeInterface |
18
|
|
|
*/ |
19
|
|
|
protected $reversedAt; |
20
|
|
|
/** |
21
|
|
|
* @var \DateTimeInterface |
22
|
|
|
*/ |
23
|
|
|
protected $requestedAt; |
24
|
|
|
/** |
25
|
|
|
* @var string |
26
|
|
|
*/ |
27
|
|
|
protected $reversingRequestId; |
28
|
|
|
/** |
29
|
|
|
* The Afterpay error that caused the reversal |
30
|
|
|
* |
31
|
|
|
* @var ErrorResponse |
32
|
|
|
*/ |
33
|
|
|
protected $errorReason; |
34
|
|
|
|
35
|
|
|
/** |
36
|
|
|
* @return string |
37
|
|
|
*/ |
38
|
|
|
public function getReverseId() |
39
|
|
|
{ |
40
|
|
|
return $this->reverseId; |
41
|
|
|
} |
42
|
|
|
|
43
|
|
|
/** |
44
|
|
|
* @param string $reverseId |
45
|
|
|
* |
46
|
|
|
* @return Reversal |
47
|
|
|
*/ |
48
|
|
|
public function setReverseId($reverseId) |
49
|
|
|
{ |
50
|
|
|
$this->reverseId = $reverseId; |
51
|
|
|
|
52
|
|
|
return $this; |
53
|
|
|
} |
54
|
|
|
|
55
|
|
|
/** |
56
|
|
|
* @return \DateTimeInterface |
57
|
|
|
*/ |
58
|
|
|
public function getReversedAt() |
59
|
|
|
{ |
60
|
|
|
return $this->reversedAt; |
61
|
|
|
} |
62
|
|
|
|
63
|
|
|
/** |
64
|
|
|
* @param \DateTimeInterface $reversedAt |
65
|
|
|
* |
66
|
|
|
* @return Reversal |
67
|
|
|
*/ |
68
|
|
|
public function setReversedAt(\DateTimeInterface $reversedAt) |
69
|
|
|
{ |
70
|
|
|
$this->reversedAt = $reversedAt; |
71
|
|
|
|
72
|
|
|
return $this; |
73
|
|
|
} |
74
|
|
|
|
75
|
|
|
/** |
76
|
|
|
* @return \DateTimeInterface |
77
|
|
|
*/ |
78
|
|
|
public function getRequestedAt() |
79
|
|
|
{ |
80
|
|
|
return $this->requestedAt; |
81
|
|
|
} |
82
|
|
|
|
83
|
|
|
/** |
84
|
|
|
* @param \DateTimeInterface $requestedAt |
85
|
|
|
* |
86
|
|
|
* @return Reversal |
87
|
|
|
*/ |
88
|
|
|
public function setRequestedAt(\DateTimeInterface $requestedAt) |
89
|
|
|
{ |
90
|
|
|
$this->requestedAt = $requestedAt; |
91
|
|
|
|
92
|
|
|
return $this; |
93
|
|
|
} |
94
|
|
|
|
95
|
|
|
/** |
96
|
|
|
* @return string |
97
|
|
|
*/ |
98
|
|
|
public function getReversingRequestId() |
99
|
|
|
{ |
100
|
|
|
return $this->reversingRequestId; |
101
|
|
|
} |
102
|
|
|
|
103
|
|
|
/** |
104
|
|
|
* @param string $reversingRequestId |
105
|
|
|
* |
106
|
|
|
* @return Reversal |
107
|
|
|
*/ |
108
|
|
|
public function setReversingRequestId($reversingRequestId) |
109
|
|
|
{ |
110
|
|
|
$this->reversingRequestId = $reversingRequestId; |
111
|
|
|
|
112
|
|
|
return $this; |
113
|
|
|
} |
114
|
|
|
|
115
|
|
|
/** |
116
|
|
|
* @return ErrorResponse |
117
|
|
|
*/ |
118
|
|
|
public function getErrorReason() |
119
|
|
|
{ |
120
|
|
|
return $this->errorReason; |
121
|
|
|
} |
122
|
|
|
|
123
|
|
|
/** |
124
|
|
|
* @param ErrorResponse $reason |
125
|
|
|
* |
126
|
|
|
* @return Reversal |
127
|
|
|
*/ |
128
|
|
|
public function setErrorReason(ErrorResponse $reason) |
129
|
|
|
{ |
130
|
|
|
$this->errorReason = $reason; |
131
|
|
|
|
132
|
|
|
return $this; |
133
|
|
|
} |
134
|
|
|
} |
135
|
|
|
|