1: | <?php |
2: | |
3: | |
4: | |
5: | |
6: | namespace Worldline\Connect\Sdk\V1\Domain; |
7: | |
8: | use UnexpectedValueException; |
9: | use Worldline\Connect\Sdk\Domain\DataObject; |
10: | |
11: | |
12: | |
13: | |
14: | class TrustlyBankAccount extends DataObject |
15: | { |
16: | |
17: | |
18: | |
19: | public $accountLastDigits = null; |
20: | |
21: | |
22: | |
23: | |
24: | public $bankName = null; |
25: | |
26: | |
27: | |
28: | |
29: | public $clearinghouse = null; |
30: | |
31: | |
32: | |
33: | |
34: | public $personIdentificationNumber = null; |
35: | |
36: | |
37: | |
38: | |
39: | public function toObject() |
40: | { |
41: | $object = parent::toObject(); |
42: | if (!is_null($this->accountLastDigits)) { |
43: | $object->accountLastDigits = $this->accountLastDigits; |
44: | } |
45: | if (!is_null($this->bankName)) { |
46: | $object->bankName = $this->bankName; |
47: | } |
48: | if (!is_null($this->clearinghouse)) { |
49: | $object->clearinghouse = $this->clearinghouse; |
50: | } |
51: | if (!is_null($this->personIdentificationNumber)) { |
52: | $object->personIdentificationNumber = $this->personIdentificationNumber; |
53: | } |
54: | return $object; |
55: | } |
56: | |
57: | |
58: | |
59: | |
60: | |
61: | |
62: | public function fromObject($object) |
63: | { |
64: | parent::fromObject($object); |
65: | if (property_exists($object, 'accountLastDigits')) { |
66: | $this->accountLastDigits = $object->accountLastDigits; |
67: | } |
68: | if (property_exists($object, 'bankName')) { |
69: | $this->bankName = $object->bankName; |
70: | } |
71: | if (property_exists($object, 'clearinghouse')) { |
72: | $this->clearinghouse = $object->clearinghouse; |
73: | } |
74: | if (property_exists($object, 'personIdentificationNumber')) { |
75: | $this->personIdentificationNumber = $object->personIdentificationNumber; |
76: | } |
77: | return $this; |
78: | } |
79: | } |
80: | |