forked from payuru/php-payu4
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathIdentityDocument.php
More file actions
64 lines (52 loc) · 1.26 KB
/
IdentityDocument.php
File metadata and controls
64 lines (52 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
declare(strict_types=1);
namespace Ypmn;
use Ypmn\Traits\ProtobufSerializable;
/**
* Документ, подтверждающий личность
*/
class IdentityDocument implements IdentityDocumentInterface
{
/** @var int Номер документа */
private int $number;
/** @var string Вид документа */
private string $type;
/** Protobuf generation Trait */
use ProtobufSerializable;
/** @inheritDoc */
public function __construct(int $number, string $type) {
$this
->setNumber($number)
->setType($type);
}
/** @inheritDoc */
public function getNumber(): int
{
return $this->number;
}
/** @inheritDoc */
public function setNumber(int $number): self
{
$this->number = $number;
return $this;
}
/** @inheritDoc */
public function getType(): string
{
return $this->type;
}
/** @inheritDoc */
public function setType(string $type): self
{
$this->type = $type;
return $this;
}
/** @inheritDoc */
public function arraySerialize(): array
{
return [
'number' => $this->getNumber(),
'type' => $this->getType(),
];
}
}