1: | <?php |
2: | |
3: | |
4: | |
5: | |
6: | namespace Worldline\Connect\Sdk\V1\Domain; |
7: | |
8: | use UnexpectedValueException; |
9: | |
10: | |
11: | |
12: | |
13: | class RedirectPaymentMethodSpecificInput extends AbstractRedirectPaymentMethodSpecificInput |
14: | { |
15: | |
16: | |
17: | |
18: | public $isRecurring = null; |
19: | |
20: | |
21: | |
22: | |
23: | public $paymentProduct4101SpecificInput = null; |
24: | |
25: | |
26: | |
27: | |
28: | public $paymentProduct809SpecificInput = null; |
29: | |
30: | |
31: | |
32: | |
33: | public $paymentProduct840SpecificInput = null; |
34: | |
35: | |
36: | |
37: | |
38: | public $paymentProduct861SpecificInput = null; |
39: | |
40: | |
41: | |
42: | |
43: | public $paymentProduct863SpecificInput = null; |
44: | |
45: | |
46: | |
47: | |
48: | public $paymentProduct869SpecificInput = null; |
49: | |
50: | |
51: | |
52: | |
53: | public $paymentProduct882SpecificInput = null; |
54: | |
55: | |
56: | |
57: | |
58: | public $redirectionData = null; |
59: | |
60: | |
61: | |
62: | |
63: | |
64: | public $returnUrl = null; |
65: | |
66: | |
67: | |
68: | |
69: | public function toObject() |
70: | { |
71: | $object = parent::toObject(); |
72: | if (!is_null($this->isRecurring)) { |
73: | $object->isRecurring = $this->isRecurring; |
74: | } |
75: | if (!is_null($this->paymentProduct4101SpecificInput)) { |
76: | $object->paymentProduct4101SpecificInput = $this->paymentProduct4101SpecificInput->toObject(); |
77: | } |
78: | if (!is_null($this->paymentProduct809SpecificInput)) { |
79: | $object->paymentProduct809SpecificInput = $this->paymentProduct809SpecificInput->toObject(); |
80: | } |
81: | if (!is_null($this->paymentProduct840SpecificInput)) { |
82: | $object->paymentProduct840SpecificInput = $this->paymentProduct840SpecificInput->toObject(); |
83: | } |
84: | if (!is_null($this->paymentProduct861SpecificInput)) { |
85: | $object->paymentProduct861SpecificInput = $this->paymentProduct861SpecificInput->toObject(); |
86: | } |
87: | if (!is_null($this->paymentProduct863SpecificInput)) { |
88: | $object->paymentProduct863SpecificInput = $this->paymentProduct863SpecificInput->toObject(); |
89: | } |
90: | if (!is_null($this->paymentProduct869SpecificInput)) { |
91: | $object->paymentProduct869SpecificInput = $this->paymentProduct869SpecificInput->toObject(); |
92: | } |
93: | if (!is_null($this->paymentProduct882SpecificInput)) { |
94: | $object->paymentProduct882SpecificInput = $this->paymentProduct882SpecificInput->toObject(); |
95: | } |
96: | if (!is_null($this->redirectionData)) { |
97: | $object->redirectionData = $this->redirectionData->toObject(); |
98: | } |
99: | if (!is_null($this->returnUrl)) { |
100: | $object->returnUrl = $this->returnUrl; |
101: | } |
102: | return $object; |
103: | } |
104: | |
105: | |
106: | |
107: | |
108: | |
109: | |
110: | public function fromObject($object) |
111: | { |
112: | parent::fromObject($object); |
113: | if (property_exists($object, 'isRecurring')) { |
114: | $this->isRecurring = $object->isRecurring; |
115: | } |
116: | if (property_exists($object, 'paymentProduct4101SpecificInput')) { |
117: | if (!is_object($object->paymentProduct4101SpecificInput)) { |
118: | throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct4101SpecificInput, true) . '\' is not an object'); |
119: | } |
120: | $value = new RedirectPaymentProduct4101SpecificInput(); |
121: | $this->paymentProduct4101SpecificInput = $value->fromObject($object->paymentProduct4101SpecificInput); |
122: | } |
123: | if (property_exists($object, 'paymentProduct809SpecificInput')) { |
124: | if (!is_object($object->paymentProduct809SpecificInput)) { |
125: | throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct809SpecificInput, true) . '\' is not an object'); |
126: | } |
127: | $value = new RedirectPaymentProduct809SpecificInput(); |
128: | $this->paymentProduct809SpecificInput = $value->fromObject($object->paymentProduct809SpecificInput); |
129: | } |
130: | if (property_exists($object, 'paymentProduct840SpecificInput')) { |
131: | if (!is_object($object->paymentProduct840SpecificInput)) { |
132: | throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct840SpecificInput, true) . '\' is not an object'); |
133: | } |
134: | $value = new RedirectPaymentProduct840SpecificInput(); |
135: | $this->paymentProduct840SpecificInput = $value->fromObject($object->paymentProduct840SpecificInput); |
136: | } |
137: | if (property_exists($object, 'paymentProduct861SpecificInput')) { |
138: | if (!is_object($object->paymentProduct861SpecificInput)) { |
139: | throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct861SpecificInput, true) . '\' is not an object'); |
140: | } |
141: | $value = new RedirectPaymentProduct861SpecificInput(); |
142: | $this->paymentProduct861SpecificInput = $value->fromObject($object->paymentProduct861SpecificInput); |
143: | } |
144: | if (property_exists($object, 'paymentProduct863SpecificInput')) { |
145: | if (!is_object($object->paymentProduct863SpecificInput)) { |
146: | throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct863SpecificInput, true) . '\' is not an object'); |
147: | } |
148: | $value = new RedirectPaymentProduct863SpecificInput(); |
149: | $this->paymentProduct863SpecificInput = $value->fromObject($object->paymentProduct863SpecificInput); |
150: | } |
151: | if (property_exists($object, 'paymentProduct869SpecificInput')) { |
152: | if (!is_object($object->paymentProduct869SpecificInput)) { |
153: | throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct869SpecificInput, true) . '\' is not an object'); |
154: | } |
155: | $value = new RedirectPaymentProduct869SpecificInput(); |
156: | $this->paymentProduct869SpecificInput = $value->fromObject($object->paymentProduct869SpecificInput); |
157: | } |
158: | if (property_exists($object, 'paymentProduct882SpecificInput')) { |
159: | if (!is_object($object->paymentProduct882SpecificInput)) { |
160: | throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct882SpecificInput, true) . '\' is not an object'); |
161: | } |
162: | $value = new RedirectPaymentProduct882SpecificInput(); |
163: | $this->paymentProduct882SpecificInput = $value->fromObject($object->paymentProduct882SpecificInput); |
164: | } |
165: | if (property_exists($object, 'redirectionData')) { |
166: | if (!is_object($object->redirectionData)) { |
167: | throw new UnexpectedValueException('value \'' . print_r($object->redirectionData, true) . '\' is not an object'); |
168: | } |
169: | $value = new RedirectionData(); |
170: | $this->redirectionData = $value->fromObject($object->redirectionData); |
171: | } |
172: | if (property_exists($object, 'returnUrl')) { |
173: | $this->returnUrl = $object->returnUrl; |
174: | } |
175: | return $this; |
176: | } |
177: | } |
178: | |