1: <?php
2: /*
3: * This class was auto-generated from the API references found at
4: * https://apireference.connect.worldline-solutions.com/
5: */
6: namespace Worldline\Connect\Sdk\V1\Domain;
7:
8: use UnexpectedValueException;
9: use Worldline\Connect\Sdk\Domain\DataObject;
10:
11: /**
12: * @package Worldline\Connect\Sdk\V1\Domain
13: *
14: * @deprecated No replacement
15: */
16: class LoanRecipient extends DataObject
17: {
18: /**
19: * @var string|null
20: *
21: * @deprecated No replacement
22: */
23: public ?string $accountNumber = null;
24:
25: /**
26: * @var string|null
27: *
28: * @deprecated No replacement
29: */
30: public ?string $dateOfBirth = null;
31:
32: /**
33: * @var string|null
34: *
35: * @deprecated No replacement
36: */
37: public ?string $partialPan = null;
38:
39: /**
40: * @var string|null
41: *
42: * @deprecated No replacement
43: */
44: public ?string $surname = null;
45:
46: /**
47: * @var string|null
48: *
49: * @deprecated No replacement
50: */
51: public ?string $zip = null;
52:
53: /**
54: * @return object
55: */
56: public function toObject(): object
57: {
58: $object = parent::toObject();
59: if (!is_null($this->accountNumber)) {
60: $object->accountNumber = $this->accountNumber;
61: }
62: if (!is_null($this->dateOfBirth)) {
63: $object->dateOfBirth = $this->dateOfBirth;
64: }
65: if (!is_null($this->partialPan)) {
66: $object->partialPan = $this->partialPan;
67: }
68: if (!is_null($this->surname)) {
69: $object->surname = $this->surname;
70: }
71: if (!is_null($this->zip)) {
72: $object->zip = $this->zip;
73: }
74: return $object;
75: }
76:
77: /**
78: * @param object $object
79: *
80: * @return $this
81: * @throws UnexpectedValueException
82: */
83: public function fromObject(object $object): LoanRecipient
84: {
85: parent::fromObject($object);
86: if (property_exists($object, 'accountNumber')) {
87: $this->accountNumber = $object->accountNumber;
88: }
89: if (property_exists($object, 'dateOfBirth')) {
90: $this->dateOfBirth = $object->dateOfBirth;
91: }
92: if (property_exists($object, 'partialPan')) {
93: $this->partialPan = $object->partialPan;
94: }
95: if (property_exists($object, 'surname')) {
96: $this->surname = $object->surname;
97: }
98: if (property_exists($object, 'zip')) {
99: $this->zip = $object->zip;
100: }
101: return $this;
102: }
103: }
104: