1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Cardinity\Method\VoidPayment; |
4
|
|
|
|
5
|
|
|
use Cardinity\Method\ResultObject; |
6
|
|
|
|
7
|
|
|
class VoidPayment extends ResultObject |
8
|
|
|
{ |
9
|
|
|
/** @type string ID of the void. |
10
|
|
|
Value assigned by Cardinity. */ |
11
|
|
|
private $id; |
12
|
|
|
|
13
|
|
|
/** @type string Can only be: void. |
14
|
|
|
Value assigned by Cardinity. */ |
15
|
|
|
private $type; |
16
|
|
|
|
17
|
|
|
/** @type string Void creation time as defined in RFC 3339 Section 5.6. |
18
|
|
|
UTC timezone. |
19
|
|
|
Value assigned by Cardinity. */ |
20
|
|
|
private $created; |
21
|
|
|
|
22
|
|
|
/** @type boolean Indicates whether a void was made in live or testing |
23
|
|
|
mode. |
24
|
|
|
Value assigned by Cardinity. */ |
25
|
|
|
private $live; |
26
|
|
|
|
27
|
|
|
/** @type string ID of the voided payment. |
28
|
|
|
Value assigned by Cardinity. */ |
29
|
|
|
private $parentId; |
30
|
|
|
|
31
|
|
|
/** @type string Void status. |
32
|
|
|
Can be one of the following: approved, declined. |
33
|
|
|
Value assigned by Cardinity. */ |
34
|
|
|
private $status; |
35
|
|
|
|
36
|
|
|
/** @type string Error message. |
37
|
|
|
Returned only if status is declined. |
38
|
|
|
Provides human readable information why a void failed. |
39
|
|
|
Value assigned by Cardinity. */ |
40
|
|
|
private $error; |
41
|
|
|
|
42
|
|
|
/** @type string Optional. Order ID provided by a merchant in initial |
43
|
|
|
payment. Must be between 2 and 50 characters [A-Za-z0-9'.-]. |
44
|
|
|
Value assigned by Cardinity. */ |
45
|
|
|
private $orderId; |
46
|
|
|
|
47
|
|
|
/** @type string Void description provided by a merchant. |
48
|
|
|
Maximum length 255 characters. */ |
49
|
|
|
private $description; |
50
|
|
|
|
51
|
|
|
/** |
52
|
|
|
* Gets the value of id. |
53
|
|
|
* @return mixed |
54
|
|
|
*/ |
55
|
|
|
public function getId() |
56
|
|
|
{ |
57
|
|
|
return $this->id; |
58
|
|
|
} |
59
|
|
|
|
60
|
|
|
/** |
61
|
|
|
* Sets the value of id. |
62
|
|
|
* @param mixed $id the id |
63
|
|
|
* @return void |
64
|
|
|
*/ |
65
|
|
|
public function setId($id) |
66
|
|
|
{ |
67
|
|
|
$this->id = $id; |
68
|
|
|
} |
69
|
|
|
|
70
|
|
|
/** |
71
|
|
|
* Gets the value of type. |
72
|
|
|
* @return mixed |
73
|
|
|
*/ |
74
|
|
|
public function getType() |
75
|
|
|
{ |
76
|
|
|
return $this->type; |
77
|
|
|
} |
78
|
|
|
|
79
|
|
|
/** |
80
|
|
|
* Sets the value of type. |
81
|
|
|
* @param mixed $type the type |
82
|
|
|
* @return void |
83
|
|
|
*/ |
84
|
|
|
public function setType($type) |
85
|
|
|
{ |
86
|
|
|
$this->type = $type; |
87
|
|
|
} |
88
|
|
|
|
89
|
|
|
/** |
90
|
|
|
* Gets the value of created. |
91
|
|
|
* @return mixed |
92
|
|
|
*/ |
93
|
|
|
public function getCreated() |
94
|
|
|
{ |
95
|
|
|
return $this->created; |
96
|
|
|
} |
97
|
|
|
|
98
|
|
|
/** |
99
|
|
|
* Sets the value of created. |
100
|
|
|
* @param mixed $created the created |
101
|
|
|
* @return void |
102
|
|
|
*/ |
103
|
|
|
public function setCreated($created) |
104
|
|
|
{ |
105
|
|
|
$this->created = $created; |
106
|
|
|
} |
107
|
|
|
|
108
|
|
|
/** |
109
|
|
|
* Gets the value of live. |
110
|
|
|
* @return mixed |
111
|
|
|
*/ |
112
|
|
|
public function getLive() |
113
|
|
|
{ |
114
|
|
|
return $this->live; |
115
|
|
|
} |
116
|
|
|
|
117
|
|
|
/** |
118
|
|
|
* Sets the value of live. |
119
|
|
|
* @param mixed $live the live |
120
|
|
|
* @return void |
121
|
|
|
*/ |
122
|
|
|
public function setLive($live) |
123
|
|
|
{ |
124
|
|
|
$this->live = $live; |
125
|
|
|
} |
126
|
|
|
|
127
|
|
|
/** |
128
|
|
|
* Gets the value of parentId. |
129
|
|
|
* @return mixed |
130
|
|
|
*/ |
131
|
|
|
public function getParentId() |
132
|
|
|
{ |
133
|
|
|
return $this->parentId; |
134
|
|
|
} |
135
|
|
|
|
136
|
|
|
/** |
137
|
|
|
* Sets the value of parentId. |
138
|
|
|
* @param mixed $parentId the parent id |
139
|
|
|
* @return void |
140
|
|
|
*/ |
141
|
|
|
public function setParentId($parentId) |
142
|
|
|
{ |
143
|
|
|
$this->parentId = $parentId; |
144
|
|
|
} |
145
|
|
|
|
146
|
|
|
/** |
147
|
|
|
* Gets the value of status. |
148
|
|
|
* @return mixed |
149
|
|
|
*/ |
150
|
|
|
public function getStatus() |
151
|
|
|
{ |
152
|
|
|
return $this->status; |
153
|
|
|
} |
154
|
|
|
|
155
|
|
|
/** |
156
|
|
|
* Sets the value of status. |
157
|
|
|
* @param mixed $status the status |
158
|
|
|
* @return void |
159
|
|
|
*/ |
160
|
|
|
public function setStatus($status) |
161
|
|
|
{ |
162
|
|
|
$this->status = $status; |
163
|
|
|
} |
164
|
|
|
|
165
|
|
|
/** |
166
|
|
|
* Gets the value of error. |
167
|
|
|
* @return mixed |
168
|
|
|
*/ |
169
|
|
|
public function getError() |
170
|
|
|
{ |
171
|
|
|
return $this->error; |
172
|
|
|
} |
173
|
|
|
|
174
|
|
|
/** |
175
|
|
|
* Sets the value of error. |
176
|
|
|
* @param mixed $error the error |
177
|
|
|
* @return void |
178
|
|
|
*/ |
179
|
|
|
public function setError($error) |
180
|
|
|
{ |
181
|
|
|
$this->error = $error; |
182
|
|
|
} |
183
|
|
|
|
184
|
|
|
/** |
185
|
|
|
* Gets the value of orderId. |
186
|
|
|
* @return mixed |
187
|
|
|
*/ |
188
|
|
|
public function getOrderId() |
189
|
|
|
{ |
190
|
|
|
return $this->orderId; |
191
|
|
|
} |
192
|
|
|
|
193
|
|
|
/** |
194
|
|
|
* Sets the value of orderId. |
195
|
|
|
* @param mixed $orderId the order id |
196
|
|
|
* @return void |
197
|
|
|
*/ |
198
|
|
|
public function setOrderId($orderId) |
199
|
|
|
{ |
200
|
|
|
$this->orderId = $orderId; |
201
|
|
|
} |
202
|
|
|
|
203
|
|
|
/** |
204
|
|
|
* Gets the value of description. |
205
|
|
|
* @return mixed |
206
|
|
|
*/ |
207
|
|
|
public function getDescription() |
208
|
|
|
{ |
209
|
|
|
return $this->description; |
210
|
|
|
} |
211
|
|
|
|
212
|
|
|
/** |
213
|
|
|
* Sets the value of description. |
214
|
|
|
* @param mixed $description the description |
215
|
|
|
* @return void |
216
|
|
|
*/ |
217
|
|
|
public function setDescription($description) |
218
|
|
|
{ |
219
|
|
|
$this->description = $description; |
220
|
|
|
} |
221
|
|
|
} |
222
|
|
|
|