|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace Integracao\ControlPay\Model; |
|
4
|
|
|
use Integracao\ControlPay\Helpers\SerializerHelper; |
|
5
|
|
|
|
|
6
|
|
|
/** |
|
7
|
|
|
* Class PagamentoExterno |
|
8
|
|
|
* @package Integracao\ControlPay\Model |
|
9
|
|
|
*/ |
|
10
|
|
|
class PagamentoExterno implements \JsonSerializable |
|
11
|
|
|
{ |
|
12
|
|
|
/** |
|
13
|
|
|
* @var integer |
|
14
|
|
|
*/ |
|
15
|
|
|
private $id; |
|
16
|
|
|
|
|
17
|
|
|
/** |
|
18
|
|
|
* @var integer |
|
19
|
|
|
*/ |
|
20
|
|
|
private $tipo; |
|
21
|
|
|
|
|
22
|
|
|
/** |
|
23
|
|
|
* @var integer |
|
24
|
|
|
*/ |
|
25
|
|
|
private $origem; |
|
26
|
|
|
|
|
27
|
|
|
/** |
|
28
|
|
|
* @var integer |
|
29
|
|
|
*/ |
|
30
|
|
|
private $tipoParcelamento; |
|
31
|
|
|
|
|
32
|
|
|
/** |
|
33
|
|
|
* @var PagamentoExternoStatus |
|
34
|
|
|
*/ |
|
35
|
|
|
private $pagamentoExternoStatus; |
|
36
|
|
|
|
|
37
|
|
|
/** |
|
38
|
|
|
* @var Pessoa |
|
39
|
|
|
*/ |
|
40
|
|
|
private $pessoa; |
|
41
|
|
|
|
|
42
|
|
|
/** |
|
43
|
|
|
* @var IntencaoVenda |
|
44
|
|
|
*/ |
|
45
|
|
|
private $intencoesVenda; |
|
46
|
|
|
|
|
47
|
|
|
/** |
|
48
|
|
|
* @var Terminal |
|
49
|
|
|
*/ |
|
50
|
|
|
private $terminal; |
|
51
|
|
|
|
|
52
|
|
|
/** |
|
53
|
|
|
* @var integer |
|
54
|
|
|
*/ |
|
55
|
|
|
private $nsuTid; |
|
56
|
|
|
|
|
57
|
|
|
/** |
|
58
|
|
|
* @var string |
|
59
|
|
|
*/ |
|
60
|
|
|
private $autorizacao; |
|
61
|
|
|
|
|
62
|
|
|
/** |
|
63
|
|
|
* @var string |
|
64
|
|
|
*/ |
|
65
|
|
|
private $adquirente; |
|
66
|
|
|
|
|
67
|
|
|
/** |
|
68
|
|
|
* @var string |
|
69
|
|
|
*/ |
|
70
|
|
|
private $codigoRespostaAdquirente; |
|
71
|
|
|
|
|
72
|
|
|
/** |
|
73
|
|
|
* @var string |
|
74
|
|
|
*/ |
|
75
|
|
|
private $mensagemRespostaAdquirente; |
|
76
|
|
|
|
|
77
|
|
|
/** |
|
78
|
|
|
* @var \DateTime |
|
79
|
|
|
*/ |
|
80
|
|
|
private $dataAdquirente; |
|
81
|
|
|
|
|
82
|
|
|
/** |
|
83
|
|
|
* @var string |
|
84
|
|
|
*/ |
|
85
|
|
|
private $respostaAdquirente; |
|
86
|
|
|
|
|
87
|
|
|
/** |
|
88
|
|
|
* @var string |
|
89
|
|
|
*/ |
|
90
|
|
|
private $comprovanteAdquirente; |
|
91
|
|
|
|
|
92
|
|
|
/** |
|
93
|
|
|
* PagamentoExterno constructor. |
|
94
|
|
|
*/ |
|
95
|
|
|
public function __construct() |
|
96
|
|
|
{ |
|
97
|
|
|
} |
|
98
|
|
|
|
|
99
|
|
|
/** |
|
100
|
|
|
* @return int |
|
101
|
|
|
*/ |
|
102
|
|
|
public function getId() |
|
103
|
|
|
{ |
|
104
|
|
|
return $this->id; |
|
105
|
|
|
} |
|
106
|
|
|
|
|
107
|
|
|
/** |
|
108
|
|
|
* @param int $id |
|
109
|
|
|
* @return PagamentoExterno |
|
110
|
|
|
*/ |
|
111
|
|
|
public function setId($id) |
|
112
|
|
|
{ |
|
113
|
|
|
$this->id = $id; |
|
114
|
|
|
return $this; |
|
115
|
|
|
} |
|
116
|
|
|
|
|
117
|
|
|
/** |
|
118
|
|
|
* @return int |
|
119
|
|
|
*/ |
|
120
|
|
|
public function getTipo() |
|
121
|
|
|
{ |
|
122
|
|
|
return $this->tipo; |
|
123
|
|
|
} |
|
124
|
|
|
|
|
125
|
|
|
/** |
|
126
|
|
|
* @param int $tipo |
|
127
|
|
|
* @return PagamentoExterno |
|
128
|
|
|
*/ |
|
129
|
|
|
public function setTipo($tipo) |
|
130
|
|
|
{ |
|
131
|
|
|
$this->tipo = $tipo; |
|
132
|
|
|
return $this; |
|
133
|
|
|
} |
|
134
|
|
|
|
|
135
|
|
|
/** |
|
136
|
|
|
* @return int |
|
137
|
|
|
*/ |
|
138
|
|
|
public function getOrigem() |
|
139
|
|
|
{ |
|
140
|
|
|
return $this->origem; |
|
141
|
|
|
} |
|
142
|
|
|
|
|
143
|
|
|
/** |
|
144
|
|
|
* @param int $origem |
|
145
|
|
|
* @return PagamentoExterno |
|
146
|
|
|
*/ |
|
147
|
|
|
public function setOrigem($origem) |
|
148
|
|
|
{ |
|
149
|
|
|
$this->origem = $origem; |
|
150
|
|
|
return $this; |
|
151
|
|
|
} |
|
152
|
|
|
|
|
153
|
|
|
/** |
|
154
|
|
|
* @return int |
|
155
|
|
|
*/ |
|
156
|
|
|
public function getTipoParcelamento() |
|
157
|
|
|
{ |
|
158
|
|
|
return $this->tipoParcelamento; |
|
159
|
|
|
} |
|
160
|
|
|
|
|
161
|
|
|
/** |
|
162
|
|
|
* @param int $tipoParcelamento |
|
163
|
|
|
* @return PagamentoExterno |
|
164
|
|
|
*/ |
|
165
|
|
|
public function setTipoParcelamento($tipoParcelamento) |
|
166
|
|
|
{ |
|
167
|
|
|
$this->tipoParcelamento = $tipoParcelamento; |
|
168
|
|
|
return $this; |
|
169
|
|
|
} |
|
170
|
|
|
|
|
171
|
|
|
/** |
|
172
|
|
|
* @return PagamentoExternoStatus |
|
173
|
|
|
*/ |
|
174
|
|
|
public function getPagamentoExternoStatus() |
|
175
|
|
|
{ |
|
176
|
|
|
return $this->pagamentoExternoStatus; |
|
177
|
|
|
} |
|
178
|
|
|
|
|
179
|
|
|
/** |
|
180
|
|
|
* @param PagamentoExternoStatus $pagamentoExternoStatus |
|
181
|
|
|
* @return PagamentoExterno |
|
182
|
|
|
*/ |
|
183
|
|
|
public function setPagamentoExternoStatus($pagamentoExternoStatus) |
|
184
|
|
|
{ |
|
185
|
|
|
$this->pagamentoExternoStatus = $pagamentoExternoStatus; |
|
186
|
|
|
|
|
187
|
|
|
if(is_array($this->pagamentoExternoStatus)) |
|
188
|
|
|
$this->pagamentoExternoStatus = SerializerHelper::denormalize( |
|
189
|
|
|
$this->pagamentoExternoStatus, PagamentoExternoStatus::class); |
|
190
|
|
|
|
|
191
|
|
|
return $this; |
|
192
|
|
|
} |
|
193
|
|
|
|
|
194
|
|
|
/** |
|
195
|
|
|
* @return Pessoa |
|
196
|
|
|
*/ |
|
197
|
|
|
public function getPessoa() |
|
198
|
|
|
{ |
|
199
|
|
|
return $this->pessoa; |
|
200
|
|
|
} |
|
201
|
|
|
|
|
202
|
|
|
/** |
|
203
|
|
|
* @param Pessoa $pessoa |
|
204
|
|
|
* @return PagamentoExterno |
|
205
|
|
|
*/ |
|
206
|
|
|
public function setPessoa($pessoa) |
|
207
|
|
|
{ |
|
208
|
|
|
$this->pessoa = $pessoa; |
|
209
|
|
|
|
|
210
|
|
|
if(is_array($this->pessoa)) |
|
211
|
|
|
$this->pessoa = SerializerHelper::denormalize($this->pessoa, Pessoa::class); |
|
212
|
|
|
|
|
213
|
|
|
return $this; |
|
214
|
|
|
} |
|
215
|
|
|
|
|
216
|
|
|
/** |
|
217
|
|
|
* @return IntencaoVenda |
|
218
|
|
|
*/ |
|
219
|
|
|
public function getIntencoesVenda() |
|
220
|
|
|
{ |
|
221
|
|
|
return $this->intencoesVenda; |
|
222
|
|
|
} |
|
223
|
|
|
|
|
224
|
|
|
/** |
|
225
|
|
|
* @param IntencaoVenda $intencoesVenda |
|
226
|
|
|
* @return PagamentoExterno |
|
227
|
|
|
*/ |
|
228
|
|
|
public function setIntencoesVenda($intencoesVenda) |
|
229
|
|
|
{ |
|
230
|
|
|
$this->intencoesVenda = $intencoesVenda; |
|
231
|
|
|
|
|
232
|
|
|
if(is_array($this->intencoesVenda)) |
|
233
|
|
|
$this->intencoesVenda = SerializerHelper::denormalize($this->intencoesVenda, IntencaoVenda::class); |
|
234
|
|
|
|
|
235
|
|
|
return $this; |
|
236
|
|
|
} |
|
237
|
|
|
|
|
238
|
|
|
/** |
|
239
|
|
|
* @return Terminal |
|
240
|
|
|
*/ |
|
241
|
|
|
public function getTerminal() |
|
242
|
|
|
{ |
|
243
|
|
|
return $this->terminal; |
|
244
|
|
|
} |
|
245
|
|
|
|
|
246
|
|
|
/** |
|
247
|
|
|
* @param Terminal $terminal |
|
248
|
|
|
* @return PagamentoExterno |
|
249
|
|
|
*/ |
|
250
|
|
|
public function setTerminal($terminal) |
|
251
|
|
|
{ |
|
252
|
|
|
$this->terminal = $terminal; |
|
253
|
|
|
|
|
254
|
|
|
if(is_array($this->terminal)) |
|
255
|
|
|
$this->terminal = SerializerHelper::denormalize($this->terminal, Terminal::class); |
|
256
|
|
|
|
|
257
|
|
|
return $this; |
|
258
|
|
|
} |
|
259
|
|
|
|
|
260
|
|
|
/** |
|
261
|
|
|
* @return int |
|
262
|
|
|
*/ |
|
263
|
|
|
public function getNsuTid() |
|
264
|
|
|
{ |
|
265
|
|
|
return $this->nsuTid; |
|
266
|
|
|
} |
|
267
|
|
|
|
|
268
|
|
|
/** |
|
269
|
|
|
* @param int $nsuTid |
|
270
|
|
|
* @return PagamentoExterno |
|
271
|
|
|
*/ |
|
272
|
|
|
public function setNsuTid($nsuTid) |
|
273
|
|
|
{ |
|
274
|
|
|
$this->nsuTid = $nsuTid; |
|
275
|
|
|
return $this; |
|
276
|
|
|
} |
|
277
|
|
|
|
|
278
|
|
|
/** |
|
279
|
|
|
* @return string |
|
280
|
|
|
*/ |
|
281
|
|
|
public function getAutorizacao() |
|
282
|
|
|
{ |
|
283
|
|
|
return $this->autorizacao; |
|
284
|
|
|
} |
|
285
|
|
|
|
|
286
|
|
|
/** |
|
287
|
|
|
* @param string $autorizacao |
|
288
|
|
|
* @return PagamentoExterno |
|
289
|
|
|
*/ |
|
290
|
|
|
public function setAutorizacao($autorizacao) |
|
291
|
|
|
{ |
|
292
|
|
|
$this->autorizacao = $autorizacao; |
|
293
|
|
|
return $this; |
|
294
|
|
|
} |
|
295
|
|
|
|
|
296
|
|
|
/** |
|
297
|
|
|
* @return string |
|
298
|
|
|
*/ |
|
299
|
|
|
public function getAdquirente() |
|
300
|
|
|
{ |
|
301
|
|
|
return $this->adquirente; |
|
302
|
|
|
} |
|
303
|
|
|
|
|
304
|
|
|
/** |
|
305
|
|
|
* @param string $adquirente |
|
306
|
|
|
* @return PagamentoExterno |
|
307
|
|
|
*/ |
|
308
|
|
|
public function setAdquirente($adquirente) |
|
309
|
|
|
{ |
|
310
|
|
|
$this->adquirente = $adquirente; |
|
311
|
|
|
return $this; |
|
312
|
|
|
} |
|
313
|
|
|
|
|
314
|
|
|
/** |
|
315
|
|
|
* @return string |
|
316
|
|
|
*/ |
|
317
|
|
|
public function getCodigoRespostaAdquirente() |
|
318
|
|
|
{ |
|
319
|
|
|
return $this->codigoRespostaAdquirente; |
|
320
|
|
|
} |
|
321
|
|
|
|
|
322
|
|
|
/** |
|
323
|
|
|
* @param string $codigoRespostaAdquirente |
|
324
|
|
|
* @return PagamentoExterno |
|
325
|
|
|
*/ |
|
326
|
|
|
public function setCodigoRespostaAdquirente($codigoRespostaAdquirente) |
|
327
|
|
|
{ |
|
328
|
|
|
$this->codigoRespostaAdquirente = $codigoRespostaAdquirente; |
|
329
|
|
|
return $this; |
|
330
|
|
|
} |
|
331
|
|
|
|
|
332
|
|
|
/** |
|
333
|
|
|
* @return string |
|
334
|
|
|
*/ |
|
335
|
|
|
public function getMensagemRespostaAdquirente() |
|
336
|
|
|
{ |
|
337
|
|
|
return $this->mensagemRespostaAdquirente; |
|
338
|
|
|
} |
|
339
|
|
|
|
|
340
|
|
|
/** |
|
341
|
|
|
* @param string $mensagemRespostaAdquirente |
|
342
|
|
|
* @return PagamentoExterno |
|
343
|
|
|
*/ |
|
344
|
|
|
public function setMensagemRespostaAdquirente($mensagemRespostaAdquirente) |
|
345
|
|
|
{ |
|
346
|
|
|
$this->mensagemRespostaAdquirente = $mensagemRespostaAdquirente; |
|
347
|
|
|
return $this; |
|
348
|
|
|
} |
|
349
|
|
|
|
|
350
|
|
|
/** |
|
351
|
|
|
* @return \DateTime |
|
352
|
|
|
*/ |
|
353
|
|
|
public function getDataAdquirente() |
|
354
|
|
|
{ |
|
355
|
|
|
return $this->dataAdquirente; |
|
356
|
|
|
} |
|
357
|
|
|
|
|
358
|
|
|
/** |
|
359
|
|
|
* @param \DateTime $dataAdquirente |
|
360
|
|
|
* @return PagamentoExterno |
|
361
|
|
|
*/ |
|
362
|
|
|
public function setDataAdquirente($dataAdquirente) |
|
363
|
|
|
{ |
|
364
|
|
|
$this->dataAdquirente = $dataAdquirente; |
|
365
|
|
|
return $this; |
|
366
|
|
|
} |
|
367
|
|
|
|
|
368
|
|
|
/** |
|
369
|
|
|
* @return string |
|
370
|
|
|
*/ |
|
371
|
|
|
public function getRespostaAdquirente() |
|
372
|
|
|
{ |
|
373
|
|
|
return $this->respostaAdquirente; |
|
374
|
|
|
} |
|
375
|
|
|
|
|
376
|
|
|
/** |
|
377
|
|
|
* @param string $respostaAdquirente |
|
378
|
|
|
* @return PagamentoExterno |
|
379
|
|
|
*/ |
|
380
|
|
|
public function setRespostaAdquirente($respostaAdquirente) |
|
381
|
|
|
{ |
|
382
|
|
|
$this->respostaAdquirente = explode(PHP_EOL, $respostaAdquirente); |
|
|
|
|
|
|
383
|
|
|
return $this; |
|
384
|
|
|
} |
|
385
|
|
|
|
|
386
|
|
|
/** |
|
387
|
|
|
* @return string |
|
388
|
|
|
*/ |
|
389
|
|
|
public function getComprovanteAdquirente() |
|
390
|
|
|
{ |
|
391
|
|
|
return $this->comprovanteAdquirente; |
|
392
|
|
|
} |
|
393
|
|
|
|
|
394
|
|
|
/** |
|
395
|
|
|
* @param string $comprovanteAdquirente |
|
396
|
|
|
* @return PagamentoExterno |
|
397
|
|
|
*/ |
|
398
|
|
|
public function setComprovanteAdquirente($comprovanteAdquirente) |
|
399
|
|
|
{ |
|
400
|
|
|
$this->comprovanteAdquirente = explode(PHP_EOL, $comprovanteAdquirente); |
|
|
|
|
|
|
401
|
|
|
return $this; |
|
402
|
|
|
} |
|
403
|
|
|
|
|
404
|
|
|
function jsonSerialize() |
|
405
|
|
|
{ |
|
406
|
|
|
return [ |
|
407
|
|
|
'id' => $this->id, |
|
408
|
|
|
'terminal' => $this->terminal, |
|
409
|
|
|
'tipo' => $this->tipo, |
|
410
|
|
|
'origem' => $this->origem, |
|
411
|
|
|
'tipoParcelamento' => $this->tipoParcelamento, |
|
412
|
|
|
'pagamentoExternoStatus' => $this->pagamentoExternoStatus, |
|
413
|
|
|
'intencoesVenda' => $this->intencoesVenda, |
|
414
|
|
|
'nsuTid' => $this->nsuTid, |
|
415
|
|
|
'autorizacao' => $this->autorizacao, |
|
416
|
|
|
'adquirente' => $this->adquirente, |
|
417
|
|
|
'codigoRespostaAdquirente' => $this->codigoRespostaAdquirente, |
|
418
|
|
|
'mensagemRespostaAdquirente' => $this->mensagemRespostaAdquirente, |
|
419
|
|
|
'dataAdquirente' => $this->dataAdquirente, |
|
420
|
|
|
'respostaAdquirente' => $this->respostaAdquirente, |
|
421
|
|
|
'comprovanteAdquirente' => $this->comprovanteAdquirente |
|
422
|
|
|
]; |
|
423
|
|
|
} |
|
424
|
|
|
|
|
425
|
|
|
|
|
426
|
|
|
} |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..