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:
10: /**
11: * @package Worldline\Connect\Sdk\V1\Domain
12: */
13: class BankAccountBban extends BankAccount
14: {
15: /**
16: * @var string|null
17: */
18: public ?string $accountNumber = null;
19:
20: /**
21: * @var string|null
22: */
23: public ?string $bankCode = null;
24:
25: /**
26: * @var string|null
27: */
28: public ?string $bankName = null;
29:
30: /**
31: * @var string|null
32: */
33: public ?string $branchCode = null;
34:
35: /**
36: * @var string|null
37: */
38: public ?string $checkDigit = null;
39:
40: /**
41: * @var string|null
42: */
43: public ?string $countryCode = null;
44:
45: /**
46: * @return object
47: */
48: public function toObject(): object
49: {
50: $object = parent::toObject();
51: if (!is_null($this->accountNumber)) {
52: $object->accountNumber = $this->accountNumber;
53: }
54: if (!is_null($this->bankCode)) {
55: $object->bankCode = $this->bankCode;
56: }
57: if (!is_null($this->bankName)) {
58: $object->bankName = $this->bankName;
59: }
60: if (!is_null($this->branchCode)) {
61: $object->branchCode = $this->branchCode;
62: }
63: if (!is_null($this->checkDigit)) {
64: $object->checkDigit = $this->checkDigit;
65: }
66: if (!is_null($this->countryCode)) {
67: $object->countryCode = $this->countryCode;
68: }
69: return $object;
70: }
71:
72: /**
73: * @param object $object
74: *
75: * @return $this
76: * @throws UnexpectedValueException
77: */
78: public function fromObject(object $object): BankAccountBban
79: {
80: parent::fromObject($object);
81: if (property_exists($object, 'accountNumber')) {
82: $this->accountNumber = $object->accountNumber;
83: }
84: if (property_exists($object, 'bankCode')) {
85: $this->bankCode = $object->bankCode;
86: }
87: if (property_exists($object, 'bankName')) {
88: $this->bankName = $object->bankName;
89: }
90: if (property_exists($object, 'branchCode')) {
91: $this->branchCode = $object->branchCode;
92: }
93: if (property_exists($object, 'checkDigit')) {
94: $this->checkDigit = $object->checkDigit;
95: }
96: if (property_exists($object, 'countryCode')) {
97: $this->countryCode = $object->countryCode;
98: }
99: return $this;
100: }
101: }
102: