1: | <?php |
2: | |
3: | |
4: | |
5: | |
6: | namespace Worldline\Connect\Sdk\V1\Domain; |
7: | |
8: | use UnexpectedValueException; |
9: | |
10: | |
11: | |
12: | |
13: | class BankAccountBban extends BankAccount |
14: | { |
15: | |
16: | |
17: | |
18: | public $accountNumber = null; |
19: | |
20: | |
21: | |
22: | |
23: | public $bankCode = null; |
24: | |
25: | |
26: | |
27: | |
28: | public $bankName = null; |
29: | |
30: | |
31: | |
32: | |
33: | public $branchCode = null; |
34: | |
35: | |
36: | |
37: | |
38: | public $checkDigit = null; |
39: | |
40: | |
41: | |
42: | |
43: | public $countryCode = null; |
44: | |
45: | |
46: | |
47: | |
48: | public function toObject() |
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: | |
74: | |
75: | |
76: | |
77: | public function fromObject($object) |
78: | { |
79: | parent::fromObject($object); |
80: | if (property_exists($object, 'accountNumber')) { |
81: | $this->accountNumber = $object->accountNumber; |
82: | } |
83: | if (property_exists($object, 'bankCode')) { |
84: | $this->bankCode = $object->bankCode; |
85: | } |
86: | if (property_exists($object, 'bankName')) { |
87: | $this->bankName = $object->bankName; |
88: | } |
89: | if (property_exists($object, 'branchCode')) { |
90: | $this->branchCode = $object->branchCode; |
91: | } |
92: | if (property_exists($object, 'checkDigit')) { |
93: | $this->checkDigit = $object->checkDigit; |
94: | } |
95: | if (property_exists($object, 'countryCode')) { |
96: | $this->countryCode = $object->countryCode; |
97: | } |
98: | return $this; |
99: | } |
100: | } |
101: | |