VenderRequest::getOperadorId()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Integracao\ControlPay\Contracts\Venda;
4
use Integracao\ControlPay\Helpers\SerializerHelper;
5
use Integracao\ControlPay\Model\Produto;
6
7
/**
8
 * Class VenderRequest
9
 * @package Integracao\ControlPay\Contracts\Venda
10
 */
11
class VenderRequest implements \JsonSerializable
12
{
13
    /**
14
     * @var integer
15
     */
16
    private $operadorId;
17
18
    /**
19
     * @var integer
20
     */
21
    private $pessoaClienteId;
22
23
    /**
24
     * @var integer
25
     */
26
    private $formaPagamentoId;
27
28
    /**
29
     * @var integer
30
     */
31
    private $terminalId;
32
33
    /**
34
     * @var integer
35
     */
36
    private $pedidoId;
37
38
    /**
39
     * @var string
40
     */
41
    private $referencia;
42
43
    /**
44
     * @var double
45
     */
46
    private $valorTotalVendido;
47
48
    /**
49
     * @var double
50
     */
51
    private $valorAcrescimo;
52
53
    /**
54
     * @var double
55
     */
56
    private $valorDesconto;
57
58
    /**
59
     * @var string
60
     */
61
    private $observacao;
62
63
    /**
64
     * @var boolean
65
     */
66
    private $parcelamentoAdmin;
67
68
    /**
69
     * @var integer
70
     */
71
    private $quantidadeParcelas;
72
73
    /**
74
     * @var boolean
75
     */
76
    private $aguardarTefIniciarTransacao;
77
78
    /**
79
     * @var array
80
     */
81
    private $produtosVendidos;
82
83
    /**
84
     * Venda constructor.
85
     */
86
    public function __construct()
87
    {
88
89
    }
90
91
    /**
92
     * @return int
93
     */
94
    public function getOperadorId()
95
    {
96
        return $this->operadorId;
97
    }
98
99
    /**
100
     * @param int $operadorId
101
     * @return VenderRequest
102
     */
103
    public function setOperadorId($operadorId)
104
    {
105
        $this->operadorId = $operadorId;
106
        return $this;
107
    }
108
109
    /**
110
     * @return int
111
     */
112
    public function getPessoaClienteId()
113
    {
114
        return $this->pessoaClienteId;
115
    }
116
117
    /**
118
     * @param int $pessoaClienteId
119
     * @return VenderRequest
120
     */
121
    public function setPessoaClienteId($pessoaClienteId)
122
    {
123
        $this->pessoaClienteId = $pessoaClienteId;
124
        return $this;
125
    }
126
127
    /**
128
     * @return int
129
     */
130
    public function getFormaPagamentoId()
131
    {
132
        return $this->formaPagamentoId;
133
    }
134
135
    /**
136
     * @param int $formaPagamentoId
137
     * @return VenderRequest
138
     */
139
    public function setFormaPagamentoId($formaPagamentoId)
140
    {
141
        $this->formaPagamentoId = $formaPagamentoId;
142
        return $this;
143
    }
144
145
    /**
146
     * @return int
147
     */
148
    public function getTerminalId()
149
    {
150
        return $this->terminalId;
151
    }
152
153
    /**
154
     * @param int $terminalId
155
     * @return VenderRequest
156
     */
157
    public function setTerminalId($terminalId)
158
    {
159
        $this->terminalId = $terminalId;
160
        return $this;
161
    }
162
163
    /**
164
     * @return int
165
     */
166
    public function getPedidoId()
167
    {
168
        return $this->pedidoId;
169
    }
170
171
    /**
172
     * @param int $pedidoId
173
     * @return VenderRequest
174
     */
175
    public function setPedidoId($pedidoId)
176
    {
177
        $this->pedidoId = $pedidoId;
178
        return $this;
179
    }
180
181
    /**
182
     * @return string
183
     */
184
    public function getReferencia()
185
    {
186
        return $this->referencia;
187
    }
188
189
    /**
190
     * @param string $referencia
191
     * @return VenderRequest
192
     */
193
    public function setReferencia($referencia)
194
    {
195
        $this->referencia = $referencia;
196
        return $this;
197
    }
198
199
    /**
200
     * @return float
201
     */
202
    public function getValorTotalVendido()
203
    {
204
        return $this->valorTotalVendido;
205
    }
206
207
    /**
208
     * @param float $valorTotalVendido
209
     * @return VenderRequest
210
     */
211
    public function setValorTotalVendido($valorTotalVendido)
212
    {
213
        $this->valorTotalVendido = $valorTotalVendido;
214
        return $this;
215
    }
216
217
    /**
218
     * @return float
219
     */
220
    public function getValorAcrescimo()
221
    {
222
        return $this->valorAcrescimo;
223
    }
224
225
    /**
226
     * @param float $valorAcrescimo
227
     * @return VenderRequest
228
     */
229
    public function setValorAcrescimo($valorAcrescimo)
230
    {
231
        $this->valorAcrescimo = $valorAcrescimo;
232
        return $this;
233
    }
234
235
    /**
236
     * @return float
237
     */
238
    public function getValorDesconto()
239
    {
240
        return $this->valorDesconto;
241
    }
242
243
    /**
244
     * @param float $valorDesconto
245
     * @return VenderRequest
246
     */
247
    public function setValorDesconto($valorDesconto)
248
    {
249
        $this->valorDesconto = $valorDesconto;
250
        return $this;
251
    }
252
253
    /**
254
     * @return string
255
     */
256
    public function getObservacao()
257
    {
258
        return $this->observacao;
259
    }
260
261
    /**
262
     * @param string $observacao
263
     * @return VenderRequest
264
     */
265
    public function setObservacao($observacao)
266
    {
267
        $this->observacao = $observacao;
268
        return $this;
269
    }
270
271
    /**
272
     * @return boolean
273
     */
274
    public function isParcelamentoAdmin()
275
    {
276
        return $this->parcelamentoAdmin;
277
    }
278
279
    /**
280
     * @param boolean $parcelamentoAdmin
281
     * @return VenderRequest
282
     */
283
    public function setParcelamentoAdmin($parcelamentoAdmin)
284
    {
285
        $this->parcelamentoAdmin = $parcelamentoAdmin;
286
        return $this;
287
    }
288
289
    /**
290
     * @return int
291
     */
292
    public function getQuantidadeParcelas()
293
    {
294
        return $this->quantidadeParcelas;
295
    }
296
297
    /**
298
     * @param int $quantidadeParcelas
299
     * @return VenderRequest
300
     */
301
    public function setQuantidadeParcelas($quantidadeParcelas)
302
    {
303
        $this->quantidadeParcelas = $quantidadeParcelas;
304
        return $this;
305
    }
306
307
    /**
308
     * @return boolean
309
     */
310
    public function isAguardarTefIniciarTransacao()
311
    {
312
        return $this->aguardarTefIniciarTransacao;
313
    }
314
315
    /**
316
     * @param boolean $aguardarTefIniciarTransacao
317
     * @return VenderRequest
318
     */
319
    public function setAguardarTefIniciarTransacao($aguardarTefIniciarTransacao)
320
    {
321
        $this->aguardarTefIniciarTransacao = $aguardarTefIniciarTransacao;
322
        return $this;
323
    }
324
325
    /**
326
     * @return array
327
     */
328
    public function getProdutosVendidos()
329
    {
330
        return $this->produtosVendidos;
331
    }
332
333
    /**
334
     * @param array $produtosVendidos
335
     * @return VenderRequest
336
     */
337
    public function setProdutosVendidos($produtosVendidos)
338
    {
339
340
        foreach ($produtosVendidos as $produto)
341
            $this->produtosVendidos[] = is_array($produto) ? SerializerHelper::denormalize($produto, Produto::class) : $produto;
342
343
        return $this;
344
    }
345
346
    function jsonSerialize()
347
    {
348
        return [
349
            "operadorId" => $this->operadorId,
350
            "pessoaClienteId" => $this->pessoaClienteId,
351
            "formaPagamentoId" => $this->formaPagamentoId,
352
            "pedidoId" => $this->pedidoId,
353
            "terminalId" => $this->terminalId,
354
            "referencia" => $this->referencia,
355
            "valorTotalVendido" => $this->valorTotalVendido,
356
            "valorAcrescimo" => $this->valorAcrescimo,
357
            "valorDesconto" => $this->valorDesconto,
358
            "observacao" => $this->observacao,
359
            "aguardarTefIniciarTransacao" => $this->aguardarTefIniciarTransacao,
360
            "parcelamentoAdmin" => $this->parcelamentoAdmin,
361
            "quantidadeParcelas" => $this->quantidadeParcelas,
362
            "produtosVendidos" => $this->produtosVendidos
363
        ];
364
    }
365
366
367
}