| 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 InAuth extends DataObject |
| 15: | { |
| 16: | |
| 17: | |
| 18: | |
| 19: | public $deviceCategory = null; |
| 20: | |
| 21: | |
| 22: | |
| 23: | |
| 24: | public $deviceId = null; |
| 25: | |
| 26: | |
| 27: | |
| 28: | |
| 29: | public $riskScore = null; |
| 30: | |
| 31: | |
| 32: | |
| 33: | |
| 34: | public $trueIpAddress = null; |
| 35: | |
| 36: | |
| 37: | |
| 38: | |
| 39: | public $trueIpAddressCountry = null; |
| 40: | |
| 41: | |
| 42: | |
| 43: | |
| 44: | public function toObject() |
| 45: | { |
| 46: | $object = parent::toObject(); |
| 47: | if (!is_null($this->deviceCategory)) { |
| 48: | $object->deviceCategory = $this->deviceCategory; |
| 49: | } |
| 50: | if (!is_null($this->deviceId)) { |
| 51: | $object->deviceId = $this->deviceId; |
| 52: | } |
| 53: | if (!is_null($this->riskScore)) { |
| 54: | $object->riskScore = $this->riskScore; |
| 55: | } |
| 56: | if (!is_null($this->trueIpAddress)) { |
| 57: | $object->trueIpAddress = $this->trueIpAddress; |
| 58: | } |
| 59: | if (!is_null($this->trueIpAddressCountry)) { |
| 60: | $object->trueIpAddressCountry = $this->trueIpAddressCountry; |
| 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, 'deviceCategory')) { |
| 74: | $this->deviceCategory = $object->deviceCategory; |
| 75: | } |
| 76: | if (property_exists($object, 'deviceId')) { |
| 77: | $this->deviceId = $object->deviceId; |
| 78: | } |
| 79: | if (property_exists($object, 'riskScore')) { |
| 80: | $this->riskScore = $object->riskScore; |
| 81: | } |
| 82: | if (property_exists($object, 'trueIpAddress')) { |
| 83: | $this->trueIpAddress = $object->trueIpAddress; |
| 84: | } |
| 85: | if (property_exists($object, 'trueIpAddressCountry')) { |
| 86: | $this->trueIpAddressCountry = $object->trueIpAddressCountry; |
| 87: | } |
| 88: | return $this; |
| 89: | } |
| 90: | } |
| 91: | |