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