| 1: | <?php |
| 2: | |
| 3: | |
| 4: | |
| 5: | |
| 6: | namespace Worldline\Connect\Sdk\V1\Domain; |
| 7: | |
| 8: | use UnexpectedValueException; |
| 9: | use Worldline\Connect\Sdk\Domain\DataObject; |
| 10: | |
| 11: | |
| 12: | |
| 13: | |
| 14: | class GPayThreeDSecure extends DataObject |
| 15: | { |
| 16: | |
| 17: | |
| 18: | |
| 19: | public $challengeCanvasSize = null; |
| 20: | |
| 21: | |
| 22: | |
| 23: | |
| 24: | public $challengeIndicator = null; |
| 25: | |
| 26: | |
| 27: | |
| 28: | |
| 29: | public $exemptionRequest = null; |
| 30: | |
| 31: | |
| 32: | |
| 33: | |
| 34: | public $redirectionData = null; |
| 35: | |
| 36: | |
| 37: | |
| 38: | |
| 39: | public $skipAuthentication = null; |
| 40: | |
| 41: | |
| 42: | |
| 43: | |
| 44: | public function toObject() |
| 45: | { |
| 46: | $object = parent::toObject(); |
| 47: | if (!is_null($this->challengeCanvasSize)) { |
| 48: | $object->challengeCanvasSize = $this->challengeCanvasSize; |
| 49: | } |
| 50: | if (!is_null($this->challengeIndicator)) { |
| 51: | $object->challengeIndicator = $this->challengeIndicator; |
| 52: | } |
| 53: | if (!is_null($this->exemptionRequest)) { |
| 54: | $object->exemptionRequest = $this->exemptionRequest; |
| 55: | } |
| 56: | if (!is_null($this->redirectionData)) { |
| 57: | $object->redirectionData = $this->redirectionData->toObject(); |
| 58: | } |
| 59: | if (!is_null($this->skipAuthentication)) { |
| 60: | $object->skipAuthentication = $this->skipAuthentication; |
| 61: | } |
| 62: | return $object; |
| 63: | } |
| 64: | |
| 65: | |
| 66: | |
| 67: | |
| 68: | |
| 69: | |
| 70: | public function fromObject($object) |
| 71: | { |
| 72: | parent::fromObject($object); |
| 73: | if (property_exists($object, 'challengeCanvasSize')) { |
| 74: | $this->challengeCanvasSize = $object->challengeCanvasSize; |
| 75: | } |
| 76: | if (property_exists($object, 'challengeIndicator')) { |
| 77: | $this->challengeIndicator = $object->challengeIndicator; |
| 78: | } |
| 79: | if (property_exists($object, 'exemptionRequest')) { |
| 80: | $this->exemptionRequest = $object->exemptionRequest; |
| 81: | } |
| 82: | if (property_exists($object, 'redirectionData')) { |
| 83: | if (!is_object($object->redirectionData)) { |
| 84: | throw new UnexpectedValueException('value \'' . print_r($object->redirectionData, true) . '\' is not an object'); |
| 85: | } |
| 86: | $value = new RedirectionData(); |
| 87: | $this->redirectionData = $value->fromObject($object->redirectionData); |
| 88: | } |
| 89: | if (property_exists($object, 'skipAuthentication')) { |
| 90: | $this->skipAuthentication = $object->skipAuthentication; |
| 91: | } |
| 92: | return $this; |
| 93: | } |
| 94: | } |
| 95: | |