|
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
|
|
|
* SipagCredentials Class |
|
11
|
|
|
* |
|
12
|
|
|
* Classe responsável pela credencial da identidade `Sipag`. |
|
13
|
|
|
*/ |
|
14
|
|
|
final class SipagCredentials extends Model |
|
15
|
|
|
{ |
|
16
|
|
|
/** |
|
17
|
|
|
* @param array $data |
|
18
|
|
|
* array de dados da credencial da Sipag. |
|
19
|
|
|
* |
|
20
|
|
|
* + [`'store_id_subscription'`] string (opcional). |
|
21
|
|
|
* + [`'store_id'`] 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('store_id_subscription')->nullable(); |
|
31
|
|
|
$schema->string('store_id')->nullable(); |
|
32
|
|
|
|
|
33
|
|
|
return $schema->build(); |
|
34
|
|
|
} |
|
35
|
|
|
|
|
36
|
|
|
/** |
|
37
|
|
|
* Retorna o valor da propriedade `store_id_subscription`. |
|
38
|
|
|
* |
|
39
|
|
|
* @return string|null |
|
40
|
|
|
*/ |
|
41
|
|
|
public function getStoreIdSubscription(): ?string |
|
42
|
|
|
{ |
|
43
|
|
|
return $this->get('store_id_subscription'); |
|
44
|
|
|
} |
|
45
|
|
|
|
|
46
|
|
|
/** |
|
47
|
|
|
* Seta o valor da propriedade `store_id_subscription`. |
|
48
|
|
|
* |
|
49
|
|
|
* @param string|null $storeIdSubscription |
|
50
|
|
|
* @return self |
|
51
|
|
|
*/ |
|
52
|
|
|
public function setStoreIdSubscription(?string $storeIdSubscription = null): self |
|
53
|
|
|
{ |
|
54
|
|
|
$this->set('store_id_subscription', $storeIdSubscription); |
|
55
|
|
|
return $this; |
|
56
|
|
|
} |
|
57
|
|
|
|
|
58
|
|
|
/** |
|
59
|
|
|
* Retorna o valor da propriedade `store_id`. |
|
60
|
|
|
* |
|
61
|
|
|
* @return string|null |
|
62
|
|
|
*/ |
|
63
|
|
|
public function getStoreId(): ?string |
|
64
|
|
|
{ |
|
65
|
|
|
return $this->get('store_id'); |
|
66
|
|
|
} |
|
67
|
|
|
|
|
68
|
|
|
/** |
|
69
|
|
|
* Seta o valor da propriedade `store_id`. |
|
70
|
|
|
* |
|
71
|
|
|
* @param string|null $storeId |
|
72
|
|
|
* @return self |
|
73
|
|
|
*/ |
|
74
|
|
|
public function setStoreId(?string $storeId = null): self |
|
75
|
|
|
{ |
|
76
|
|
|
$this->set('store_id', $storeId); |
|
77
|
|
|
return $this; |
|
78
|
|
|
} |
|
79
|
|
|
|
|
80
|
|
|
} |