1: <?php
2: /*
3: * This class was auto-generated from the API references found at
4: * https://apireference.connect.worldline-solutions.com/
5: */
6: namespace Worldline\Connect\Sdk\V1\Domain;
7:
8: use UnexpectedValueException;
9:
10: /**
11: * @package Worldline\Connect\Sdk\V1\Domain
12: */
13: class CashPaymentMethodSpecificInput extends AbstractCashPaymentMethodSpecificInput
14: {
15: /**
16: * @var CashPaymentProduct1502SpecificInput|null
17: */
18: public ?CashPaymentProduct1502SpecificInput $paymentProduct1502SpecificInput = null;
19:
20: /**
21: * @var CashPaymentProduct1503SpecificInput|null
22: *
23: * @deprecated No replacement
24: */
25: public ?CashPaymentProduct1503SpecificInput $paymentProduct1503SpecificInput = null;
26:
27: /**
28: * @var CashPaymentProduct1504SpecificInput|null
29: */
30: public ?CashPaymentProduct1504SpecificInput $paymentProduct1504SpecificInput = null;
31:
32: /**
33: * @var CashPaymentProduct1506SpecificInput|null
34: */
35: public ?CashPaymentProduct1506SpecificInput $paymentProduct1506SpecificInput = null;
36:
37: /**
38: * @var CashPaymentProduct1508SpecificInput|null
39: */
40: public ?CashPaymentProduct1508SpecificInput $paymentProduct1508SpecificInput = null;
41:
42: /**
43: * @var CashPaymentProduct1521SpecificInput|null
44: */
45: public ?CashPaymentProduct1521SpecificInput $paymentProduct1521SpecificInput = null;
46:
47: /**
48: * @var CashPaymentProduct1522SpecificInput|null
49: */
50: public ?CashPaymentProduct1522SpecificInput $paymentProduct1522SpecificInput = null;
51:
52: /**
53: * @var CashPaymentProduct1523SpecificInput|null
54: */
55: public ?CashPaymentProduct1523SpecificInput $paymentProduct1523SpecificInput = null;
56:
57: /**
58: * @var CashPaymentProduct1524SpecificInput|null
59: */
60: public ?CashPaymentProduct1524SpecificInput $paymentProduct1524SpecificInput = null;
61:
62: /**
63: * @var CashPaymentProduct1525SpecificInput|null
64: */
65: public ?CashPaymentProduct1525SpecificInput $paymentProduct1525SpecificInput = null;
66:
67: /**
68: * @var CashPaymentProduct1526SpecificInput|null
69: */
70: public ?CashPaymentProduct1526SpecificInput $paymentProduct1526SpecificInput = null;
71:
72: /**
73: * @return object
74: */
75: public function toObject(): object
76: {
77: $object = parent::toObject();
78: if (!is_null($this->paymentProduct1502SpecificInput)) {
79: $object->paymentProduct1502SpecificInput = $this->paymentProduct1502SpecificInput->toObject();
80: }
81: if (!is_null($this->paymentProduct1503SpecificInput)) {
82: $object->paymentProduct1503SpecificInput = $this->paymentProduct1503SpecificInput->toObject();
83: }
84: if (!is_null($this->paymentProduct1504SpecificInput)) {
85: $object->paymentProduct1504SpecificInput = $this->paymentProduct1504SpecificInput->toObject();
86: }
87: if (!is_null($this->paymentProduct1506SpecificInput)) {
88: $object->paymentProduct1506SpecificInput = $this->paymentProduct1506SpecificInput->toObject();
89: }
90: if (!is_null($this->paymentProduct1508SpecificInput)) {
91: $object->paymentProduct1508SpecificInput = $this->paymentProduct1508SpecificInput->toObject();
92: }
93: if (!is_null($this->paymentProduct1521SpecificInput)) {
94: $object->paymentProduct1521SpecificInput = $this->paymentProduct1521SpecificInput->toObject();
95: }
96: if (!is_null($this->paymentProduct1522SpecificInput)) {
97: $object->paymentProduct1522SpecificInput = $this->paymentProduct1522SpecificInput->toObject();
98: }
99: if (!is_null($this->paymentProduct1523SpecificInput)) {
100: $object->paymentProduct1523SpecificInput = $this->paymentProduct1523SpecificInput->toObject();
101: }
102: if (!is_null($this->paymentProduct1524SpecificInput)) {
103: $object->paymentProduct1524SpecificInput = $this->paymentProduct1524SpecificInput->toObject();
104: }
105: if (!is_null($this->paymentProduct1525SpecificInput)) {
106: $object->paymentProduct1525SpecificInput = $this->paymentProduct1525SpecificInput->toObject();
107: }
108: if (!is_null($this->paymentProduct1526SpecificInput)) {
109: $object->paymentProduct1526SpecificInput = $this->paymentProduct1526SpecificInput->toObject();
110: }
111: return $object;
112: }
113:
114: /**
115: * @param object $object
116: *
117: * @return $this
118: * @throws UnexpectedValueException
119: */
120: public function fromObject(object $object): CashPaymentMethodSpecificInput
121: {
122: parent::fromObject($object);
123: if (property_exists($object, 'paymentProduct1502SpecificInput')) {
124: if (!is_object($object->paymentProduct1502SpecificInput)) {
125: throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct1502SpecificInput, true) . '\' is not an object');
126: }
127: $value = new CashPaymentProduct1502SpecificInput();
128: $this->paymentProduct1502SpecificInput = $value->fromObject($object->paymentProduct1502SpecificInput);
129: }
130: if (property_exists($object, 'paymentProduct1503SpecificInput')) {
131: if (!is_object($object->paymentProduct1503SpecificInput)) {
132: throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct1503SpecificInput, true) . '\' is not an object');
133: }
134: $value = new CashPaymentProduct1503SpecificInput();
135: $this->paymentProduct1503SpecificInput = $value->fromObject($object->paymentProduct1503SpecificInput);
136: }
137: if (property_exists($object, 'paymentProduct1504SpecificInput')) {
138: if (!is_object($object->paymentProduct1504SpecificInput)) {
139: throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct1504SpecificInput, true) . '\' is not an object');
140: }
141: $value = new CashPaymentProduct1504SpecificInput();
142: $this->paymentProduct1504SpecificInput = $value->fromObject($object->paymentProduct1504SpecificInput);
143: }
144: if (property_exists($object, 'paymentProduct1506SpecificInput')) {
145: if (!is_object($object->paymentProduct1506SpecificInput)) {
146: throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct1506SpecificInput, true) . '\' is not an object');
147: }
148: $value = new CashPaymentProduct1506SpecificInput();
149: $this->paymentProduct1506SpecificInput = $value->fromObject($object->paymentProduct1506SpecificInput);
150: }
151: if (property_exists($object, 'paymentProduct1508SpecificInput')) {
152: if (!is_object($object->paymentProduct1508SpecificInput)) {
153: throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct1508SpecificInput, true) . '\' is not an object');
154: }
155: $value = new CashPaymentProduct1508SpecificInput();
156: $this->paymentProduct1508SpecificInput = $value->fromObject($object->paymentProduct1508SpecificInput);
157: }
158: if (property_exists($object, 'paymentProduct1521SpecificInput')) {
159: if (!is_object($object->paymentProduct1521SpecificInput)) {
160: throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct1521SpecificInput, true) . '\' is not an object');
161: }
162: $value = new CashPaymentProduct1521SpecificInput();
163: $this->paymentProduct1521SpecificInput = $value->fromObject($object->paymentProduct1521SpecificInput);
164: }
165: if (property_exists($object, 'paymentProduct1522SpecificInput')) {
166: if (!is_object($object->paymentProduct1522SpecificInput)) {
167: throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct1522SpecificInput, true) . '\' is not an object');
168: }
169: $value = new CashPaymentProduct1522SpecificInput();
170: $this->paymentProduct1522SpecificInput = $value->fromObject($object->paymentProduct1522SpecificInput);
171: }
172: if (property_exists($object, 'paymentProduct1523SpecificInput')) {
173: if (!is_object($object->paymentProduct1523SpecificInput)) {
174: throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct1523SpecificInput, true) . '\' is not an object');
175: }
176: $value = new CashPaymentProduct1523SpecificInput();
177: $this->paymentProduct1523SpecificInput = $value->fromObject($object->paymentProduct1523SpecificInput);
178: }
179: if (property_exists($object, 'paymentProduct1524SpecificInput')) {
180: if (!is_object($object->paymentProduct1524SpecificInput)) {
181: throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct1524SpecificInput, true) . '\' is not an object');
182: }
183: $value = new CashPaymentProduct1524SpecificInput();
184: $this->paymentProduct1524SpecificInput = $value->fromObject($object->paymentProduct1524SpecificInput);
185: }
186: if (property_exists($object, 'paymentProduct1525SpecificInput')) {
187: if (!is_object($object->paymentProduct1525SpecificInput)) {
188: throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct1525SpecificInput, true) . '\' is not an object');
189: }
190: $value = new CashPaymentProduct1525SpecificInput();
191: $this->paymentProduct1525SpecificInput = $value->fromObject($object->paymentProduct1525SpecificInput);
192: }
193: if (property_exists($object, 'paymentProduct1526SpecificInput')) {
194: if (!is_object($object->paymentProduct1526SpecificInput)) {
195: throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct1526SpecificInput, true) . '\' is not an object');
196: }
197: $value = new CashPaymentProduct1526SpecificInput();
198: $this->paymentProduct1526SpecificInput = $value->fromObject($object->paymentProduct1526SpecificInput);
199: }
200: return $this;
201: }
202: }
203: