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