1: | <?php |
2: | |
3: | |
4: | |
5: | |
6: | namespace Worldline\Connect\Sdk\V1\Domain; |
7: | |
8: | use UnexpectedValueException; |
9: | |
10: | |
11: | |
12: | |
13: | class BankTransferPayoutMethodSpecificInput extends AbstractPayoutMethodSpecificInput |
14: | { |
15: | |
16: | |
17: | |
18: | public $bankAccountBban = null; |
19: | |
20: | |
21: | |
22: | |
23: | public $bankAccountIban = null; |
24: | |
25: | |
26: | |
27: | |
28: | |
29: | public $customer = null; |
30: | |
31: | |
32: | |
33: | |
34: | public $payoutDate = null; |
35: | |
36: | |
37: | |
38: | |
39: | public $payoutText = null; |
40: | |
41: | |
42: | |
43: | |
44: | public $swiftCode = null; |
45: | |
46: | |
47: | |
48: | |
49: | public function toObject() |
50: | { |
51: | $object = parent::toObject(); |
52: | if (!is_null($this->bankAccountBban)) { |
53: | $object->bankAccountBban = $this->bankAccountBban->toObject(); |
54: | } |
55: | if (!is_null($this->bankAccountIban)) { |
56: | $object->bankAccountIban = $this->bankAccountIban->toObject(); |
57: | } |
58: | if (!is_null($this->customer)) { |
59: | $object->customer = $this->customer->toObject(); |
60: | } |
61: | if (!is_null($this->payoutDate)) { |
62: | $object->payoutDate = $this->payoutDate; |
63: | } |
64: | if (!is_null($this->payoutText)) { |
65: | $object->payoutText = $this->payoutText; |
66: | } |
67: | if (!is_null($this->swiftCode)) { |
68: | $object->swiftCode = $this->swiftCode; |
69: | } |
70: | return $object; |
71: | } |
72: | |
73: | |
74: | |
75: | |
76: | |
77: | |
78: | public function fromObject($object) |
79: | { |
80: | parent::fromObject($object); |
81: | if (property_exists($object, 'bankAccountBban')) { |
82: | if (!is_object($object->bankAccountBban)) { |
83: | throw new UnexpectedValueException('value \'' . print_r($object->bankAccountBban, true) . '\' is not an object'); |
84: | } |
85: | $value = new BankAccountBban(); |
86: | $this->bankAccountBban = $value->fromObject($object->bankAccountBban); |
87: | } |
88: | if (property_exists($object, 'bankAccountIban')) { |
89: | if (!is_object($object->bankAccountIban)) { |
90: | throw new UnexpectedValueException('value \'' . print_r($object->bankAccountIban, true) . '\' is not an object'); |
91: | } |
92: | $value = new BankAccountIban(); |
93: | $this->bankAccountIban = $value->fromObject($object->bankAccountIban); |
94: | } |
95: | if (property_exists($object, 'customer')) { |
96: | if (!is_object($object->customer)) { |
97: | throw new UnexpectedValueException('value \'' . print_r($object->customer, true) . '\' is not an object'); |
98: | } |
99: | $value = new PayoutCustomer(); |
100: | $this->customer = $value->fromObject($object->customer); |
101: | } |
102: | if (property_exists($object, 'payoutDate')) { |
103: | $this->payoutDate = $object->payoutDate; |
104: | } |
105: | if (property_exists($object, 'payoutText')) { |
106: | $this->payoutText = $object->payoutText; |
107: | } |
108: | if (property_exists($object, 'swiftCode')) { |
109: | $this->swiftCode = $object->swiftCode; |
110: | } |
111: | return $this; |
112: | } |
113: | } |
114: | |