1: | <?php |
2: | |
3: | |
4: | |
5: | |
6: | namespace Worldline\Connect\Sdk\V1\Domain; |
7: | |
8: | use UnexpectedValueException; |
9: | |
10: | |
11: | |
12: | |
13: | class CashPaymentMethodSpecificInput extends AbstractCashPaymentMethodSpecificInput |
14: | { |
15: | |
16: | |
17: | |
18: | |
19: | public $paymentProduct1503SpecificInput = null; |
20: | |
21: | |
22: | |
23: | |
24: | public $paymentProduct1504SpecificInput = null; |
25: | |
26: | |
27: | |
28: | |
29: | public $paymentProduct1521SpecificInput = null; |
30: | |
31: | |
32: | |
33: | |
34: | public $paymentProduct1522SpecificInput = null; |
35: | |
36: | |
37: | |
38: | |
39: | public $paymentProduct1523SpecificInput = null; |
40: | |
41: | |
42: | |
43: | |
44: | public $paymentProduct1524SpecificInput = null; |
45: | |
46: | |
47: | |
48: | |
49: | public $paymentProduct1526SpecificInput = null; |
50: | |
51: | |
52: | |
53: | |
54: | public function toObject() |
55: | { |
56: | $object = parent::toObject(); |
57: | if (!is_null($this->paymentProduct1503SpecificInput)) { |
58: | $object->paymentProduct1503SpecificInput = $this->paymentProduct1503SpecificInput->toObject(); |
59: | } |
60: | if (!is_null($this->paymentProduct1504SpecificInput)) { |
61: | $object->paymentProduct1504SpecificInput = $this->paymentProduct1504SpecificInput->toObject(); |
62: | } |
63: | if (!is_null($this->paymentProduct1521SpecificInput)) { |
64: | $object->paymentProduct1521SpecificInput = $this->paymentProduct1521SpecificInput->toObject(); |
65: | } |
66: | if (!is_null($this->paymentProduct1522SpecificInput)) { |
67: | $object->paymentProduct1522SpecificInput = $this->paymentProduct1522SpecificInput->toObject(); |
68: | } |
69: | if (!is_null($this->paymentProduct1523SpecificInput)) { |
70: | $object->paymentProduct1523SpecificInput = $this->paymentProduct1523SpecificInput->toObject(); |
71: | } |
72: | if (!is_null($this->paymentProduct1524SpecificInput)) { |
73: | $object->paymentProduct1524SpecificInput = $this->paymentProduct1524SpecificInput->toObject(); |
74: | } |
75: | if (!is_null($this->paymentProduct1526SpecificInput)) { |
76: | $object->paymentProduct1526SpecificInput = $this->paymentProduct1526SpecificInput->toObject(); |
77: | } |
78: | return $object; |
79: | } |
80: | |
81: | |
82: | |
83: | |
84: | |
85: | |
86: | public function fromObject($object) |
87: | { |
88: | parent::fromObject($object); |
89: | if (property_exists($object, 'paymentProduct1503SpecificInput')) { |
90: | if (!is_object($object->paymentProduct1503SpecificInput)) { |
91: | throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct1503SpecificInput, true) . '\' is not an object'); |
92: | } |
93: | $value = new CashPaymentProduct1503SpecificInput(); |
94: | $this->paymentProduct1503SpecificInput = $value->fromObject($object->paymentProduct1503SpecificInput); |
95: | } |
96: | if (property_exists($object, 'paymentProduct1504SpecificInput')) { |
97: | if (!is_object($object->paymentProduct1504SpecificInput)) { |
98: | throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct1504SpecificInput, true) . '\' is not an object'); |
99: | } |
100: | $value = new CashPaymentProduct1504SpecificInput(); |
101: | $this->paymentProduct1504SpecificInput = $value->fromObject($object->paymentProduct1504SpecificInput); |
102: | } |
103: | if (property_exists($object, 'paymentProduct1521SpecificInput')) { |
104: | if (!is_object($object->paymentProduct1521SpecificInput)) { |
105: | throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct1521SpecificInput, true) . '\' is not an object'); |
106: | } |
107: | $value = new CashPaymentProduct1521SpecificInput(); |
108: | $this->paymentProduct1521SpecificInput = $value->fromObject($object->paymentProduct1521SpecificInput); |
109: | } |
110: | if (property_exists($object, 'paymentProduct1522SpecificInput')) { |
111: | if (!is_object($object->paymentProduct1522SpecificInput)) { |
112: | throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct1522SpecificInput, true) . '\' is not an object'); |
113: | } |
114: | $value = new CashPaymentProduct1522SpecificInput(); |
115: | $this->paymentProduct1522SpecificInput = $value->fromObject($object->paymentProduct1522SpecificInput); |
116: | } |
117: | if (property_exists($object, 'paymentProduct1523SpecificInput')) { |
118: | if (!is_object($object->paymentProduct1523SpecificInput)) { |
119: | throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct1523SpecificInput, true) . '\' is not an object'); |
120: | } |
121: | $value = new CashPaymentProduct1523SpecificInput(); |
122: | $this->paymentProduct1523SpecificInput = $value->fromObject($object->paymentProduct1523SpecificInput); |
123: | } |
124: | if (property_exists($object, 'paymentProduct1524SpecificInput')) { |
125: | if (!is_object($object->paymentProduct1524SpecificInput)) { |
126: | throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct1524SpecificInput, true) . '\' is not an object'); |
127: | } |
128: | $value = new CashPaymentProduct1524SpecificInput(); |
129: | $this->paymentProduct1524SpecificInput = $value->fromObject($object->paymentProduct1524SpecificInput); |
130: | } |
131: | if (property_exists($object, 'paymentProduct1526SpecificInput')) { |
132: | if (!is_object($object->paymentProduct1526SpecificInput)) { |
133: | throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct1526SpecificInput, true) . '\' is not an object'); |
134: | } |
135: | $value = new CashPaymentProduct1526SpecificInput(); |
136: | $this->paymentProduct1526SpecificInput = $value->fromObject($object->paymentProduct1526SpecificInput); |
137: | } |
138: | return $this; |
139: | } |
140: | } |
141: | |