RedeCredentials::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 3
rs 10
1
<?php
2
3
namespace Ipag\Sdk\Support\Credentials\PaymentMethods;
4
5
use Ipag\Sdk\Model\Model;
6
use Ipag\Sdk\Model\Schema\Schema;
7
use Ipag\Sdk\Model\Schema\SchemaBuilder;
8
9
/**
10
 * RedeCredentials Class
11
 *
12
 * Classe responsável pela credencial da identidade `Rede`.
13
 */
14
final class RedeCredentials extends Model
15
{
16
    /**
17
     *  @param array $data
18
     *  array de dados da credencial da Rede.
19
     *
20
     *  + [`'erede_key'`] string (opcional).
21
     *  + [`'pv'`] string (opcional).
22
     *
23
     */
24
    public function __construct(?array $data = [])
25
    {
26
        parent::__construct($data);
27
    }
28
    public function schema(SchemaBuilder $schema): Schema
29
    {
30
        $schema->string('erede_key')->nullable();
31
        $schema->string('pv')->nullable();
32
33
        return $schema->build();
34
    }
35
36
    /**
37
     * Retorna o valor da propriedade `erede_key`.
38
     *
39
     * @return string|null
40
     */
41
    public function getEredeKey(): ?string
42
    {
43
        return $this->get('erede_key');
44
    }
45
46
    /**
47
     * Seta o valor da propriedade `erede_key`.
48
     *
49
     * @param string|null $eredeKey
50
     * @return self
51
     */
52
    public function setEredeKey(?string $eredeKey = null): self
53
    {
54
        $this->set('erede_key', $eredeKey);
55
        return $this;
56
    }
57
58
    /**
59
     * Retorna o valor da propriedade `pv`.
60
     *
61
     * @return string|null
62
     */
63
    public function getPv(): ?string
64
    {
65
        return $this->get('pv');
66
    }
67
68
    /**
69
     * Seta o valor da propriedade `pv`.
70
     *
71
     * @param string|null $pv
72
     * @return self
73
     */
74
    public function setPv(?string $pv = null): self
75
    {
76
        $this->set('pv', $pv);
77
        return $this;
78
    }
79
80
}