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
|
|
|
* ZoopCredentials Class |
11
|
|
|
* |
12
|
|
|
* Classe responsável pela credencial da identidade `Zoop`. |
13
|
|
|
*/ |
14
|
|
|
final class ZoopCredentials extends Model |
15
|
|
|
{ |
16
|
|
|
/** |
17
|
|
|
* @param array $data |
18
|
|
|
* array de dados da credencial da Zoop. |
19
|
|
|
* |
20
|
|
|
* + [`'marketplace_id'`] string (opcional). |
21
|
|
|
* + [`'publishable_key'`] string (opcional). |
22
|
|
|
* + [`'seller_id'`] string (opcional). |
23
|
|
|
* |
24
|
|
|
*/ |
25
|
|
|
public function __construct(?array $data = []) |
26
|
|
|
{ |
27
|
|
|
parent::__construct($data); |
28
|
|
|
} |
29
|
|
|
public function schema(SchemaBuilder $schema): Schema |
30
|
|
|
{ |
31
|
|
|
$schema->string('marketplace_id')->nullable(); |
32
|
|
|
$schema->string('publishable_key')->nullable(); |
33
|
|
|
$schema->string('seller_id')->nullable(); |
34
|
|
|
|
35
|
|
|
return $schema->build(); |
36
|
|
|
} |
37
|
|
|
|
38
|
|
|
/** |
39
|
|
|
* Retorna o valor da propriedade `marketplace_id`. |
40
|
|
|
* |
41
|
|
|
* @return string|null |
42
|
|
|
*/ |
43
|
|
|
public function getMarketplaceId(): ?string |
44
|
|
|
{ |
45
|
|
|
return $this->get('marketplace_id'); |
46
|
|
|
} |
47
|
|
|
|
48
|
|
|
/** |
49
|
|
|
* Seta o valor da propriedade `marketplace_id`. |
50
|
|
|
* |
51
|
|
|
* @param string|null $marketplaceId |
52
|
|
|
* @return self |
53
|
|
|
*/ |
54
|
|
|
public function setMarketplaceId(?string $marketplaceId = null): self |
55
|
|
|
{ |
56
|
|
|
$this->set('marketplace_id', $marketplaceId); |
57
|
|
|
return $this; |
58
|
|
|
} |
59
|
|
|
|
60
|
|
|
/** |
61
|
|
|
* Retorna o valor da propriedade `publishable_key`. |
62
|
|
|
* |
63
|
|
|
* @return string|null |
64
|
|
|
*/ |
65
|
|
|
public function getPublishableKey(): ?string |
66
|
|
|
{ |
67
|
|
|
return $this->get('publishable_key'); |
68
|
|
|
} |
69
|
|
|
|
70
|
|
|
/** |
71
|
|
|
* Seta o valor da propriedade `publishable_key`. |
72
|
|
|
* |
73
|
|
|
* @param string|null $publishableKey |
74
|
|
|
* @return self |
75
|
|
|
*/ |
76
|
|
|
public function setPublishableKey(?string $publishableKey = null): self |
77
|
|
|
{ |
78
|
|
|
$this->set('publishable_key', $publishableKey); |
79
|
|
|
return $this; |
80
|
|
|
} |
81
|
|
|
|
82
|
|
|
/** |
83
|
|
|
* Retorna o valor da propriedade `seller_id`. |
84
|
|
|
* |
85
|
|
|
* @return string|null |
86
|
|
|
*/ |
87
|
|
|
public function getSellerId(): ?string |
88
|
|
|
{ |
89
|
|
|
return $this->get('seller_id'); |
90
|
|
|
} |
91
|
|
|
|
92
|
|
|
/** |
93
|
|
|
* Seta o valor da propriedade `seller_id`. |
94
|
|
|
* |
95
|
|
|
* @param string|null $sellerId |
96
|
|
|
* @return self |
97
|
|
|
*/ |
98
|
|
|
public function setSellerId(?string $sellerId = null): self |
99
|
|
|
{ |
100
|
|
|
$this->set('seller_id', $sellerId); |
101
|
|
|
return $this; |
102
|
|
|
} |
103
|
|
|
|
104
|
|
|
} |