|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace Ipag\Sdk\Support\Credentials\Antifraudes; |
|
4
|
|
|
|
|
5
|
|
|
use Ipag\Sdk\Model\Model; |
|
6
|
|
|
use Ipag\Sdk\Model\Schema\Schema; |
|
7
|
|
|
use Ipag\Sdk\Model\Schema\SchemaBuilder; |
|
8
|
|
|
|
|
9
|
|
|
/** |
|
10
|
|
|
* RedShieldCredentials Class |
|
11
|
|
|
* |
|
12
|
|
|
* Classe responsável pela credencial a identidade `Red Shield`. |
|
13
|
|
|
*/ |
|
14
|
|
|
final class RedShieldCredentials extends Model |
|
15
|
|
|
{ |
|
16
|
|
|
|
|
17
|
|
|
/** |
|
18
|
|
|
* @param array $data |
|
19
|
|
|
* array de dados do Clear Sale. |
|
20
|
|
|
* |
|
21
|
|
|
* + [`'token'`] string (opcional). |
|
22
|
|
|
* + [`'entityId'`] string (opcional). |
|
23
|
|
|
* + [`'channelId'`] string (opcional). |
|
24
|
|
|
* + [`'serviceId'`] string (opcional). |
|
25
|
|
|
* |
|
26
|
|
|
*/ |
|
27
|
|
|
public function __construct(?array $data = []) |
|
28
|
|
|
{ |
|
29
|
|
|
parent::__construct($data); |
|
30
|
|
|
} |
|
31
|
|
|
|
|
32
|
|
|
public function schema(SchemaBuilder $schema): Schema |
|
33
|
|
|
{ |
|
34
|
|
|
$schema->string('token')->nullable(); |
|
35
|
|
|
$schema->string('entityId')->nullable(); |
|
36
|
|
|
$schema->string('channelId')->nullable(); |
|
37
|
|
|
$schema->string('serviceId')->nullable(); |
|
38
|
|
|
|
|
39
|
|
|
return $schema->build(); |
|
40
|
|
|
} |
|
41
|
|
|
|
|
42
|
|
|
/** |
|
43
|
|
|
* Retorna o valor da propriedade `token`. |
|
44
|
|
|
* |
|
45
|
|
|
* @return string|null |
|
46
|
|
|
*/ |
|
47
|
|
|
public function getToken(): ?string |
|
48
|
|
|
{ |
|
49
|
|
|
return $this->get('token'); |
|
50
|
|
|
} |
|
51
|
|
|
|
|
52
|
|
|
/** |
|
53
|
|
|
* Seta o valor da propriedade `token`. |
|
54
|
|
|
* |
|
55
|
|
|
* @param string|null $token |
|
56
|
|
|
* @return self |
|
57
|
|
|
*/ |
|
58
|
|
|
public function setToken(?string $token = null): self |
|
59
|
|
|
{ |
|
60
|
|
|
$this->set('token', $token); |
|
61
|
|
|
return $this; |
|
62
|
|
|
} |
|
63
|
|
|
|
|
64
|
|
|
/** |
|
65
|
|
|
* Retorna o valor da propriedade `entityId`. |
|
66
|
|
|
* |
|
67
|
|
|
* @return string|null |
|
68
|
|
|
*/ |
|
69
|
|
|
public function getEntityId(): ?string |
|
70
|
|
|
{ |
|
71
|
|
|
return $this->get('entityId'); |
|
72
|
|
|
} |
|
73
|
|
|
|
|
74
|
|
|
/** |
|
75
|
|
|
* Seta o valor da propriedade `entityId`. |
|
76
|
|
|
* |
|
77
|
|
|
* @param string|null $entityId |
|
78
|
|
|
* @return self |
|
79
|
|
|
*/ |
|
80
|
|
|
public function setEntityId(?string $entityId = null): self |
|
81
|
|
|
{ |
|
82
|
|
|
$this->set('entityId', $entityId); |
|
83
|
|
|
return $this; |
|
84
|
|
|
} |
|
85
|
|
|
|
|
86
|
|
|
/** |
|
87
|
|
|
* Retorna o valor da propriedade `channelId`. |
|
88
|
|
|
* |
|
89
|
|
|
* @return string|null |
|
90
|
|
|
*/ |
|
91
|
|
|
public function getChannelId(): ?string |
|
92
|
|
|
{ |
|
93
|
|
|
return $this->get('channelId'); |
|
94
|
|
|
} |
|
95
|
|
|
|
|
96
|
|
|
/** |
|
97
|
|
|
* Seta o valor da propriedade `channelId`. |
|
98
|
|
|
* |
|
99
|
|
|
* @param string|null $channelId |
|
100
|
|
|
* @return self |
|
101
|
|
|
*/ |
|
102
|
|
|
public function setChannelId(?string $channelId = null): self |
|
103
|
|
|
{ |
|
104
|
|
|
$this->set('channelId', $channelId); |
|
105
|
|
|
return $this; |
|
106
|
|
|
} |
|
107
|
|
|
|
|
108
|
|
|
/** |
|
109
|
|
|
* Retorna o valor da propriedade `serviceId`. |
|
110
|
|
|
* |
|
111
|
|
|
* @return string|null |
|
112
|
|
|
*/ |
|
113
|
|
|
public function getServiceId(): ?string |
|
114
|
|
|
{ |
|
115
|
|
|
return $this->get('serviceId'); |
|
116
|
|
|
} |
|
117
|
|
|
|
|
118
|
|
|
/** |
|
119
|
|
|
* Seta o valor da propriedade `serviceId`. |
|
120
|
|
|
* |
|
121
|
|
|
* @param string|null $serviceId |
|
122
|
|
|
* @return self |
|
123
|
|
|
*/ |
|
124
|
|
|
public function setServiceId(?string $serviceId = null): self |
|
125
|
|
|
{ |
|
126
|
|
|
$this->set('serviceId', $serviceId); |
|
127
|
|
|
return $this; |
|
128
|
|
|
} |
|
129
|
|
|
|
|
130
|
|
|
} |